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

fix(reflect): failure to load assembly from "npm pack" #1117

Merged
merged 2 commits into from
Dec 13, 2019

Conversation

RomainMuller
Copy link
Contributor

When the package.json file is the result of extracting a tarball
obtained from npm pack, it may have been processed by npmjs.com
during publishing, which can cause the bundleDependencies property to
appear with the value false. The null-coalescing (??) operator does
not rescue this properly and this results in a TypeError.

This is fixed by using || chaining instead of a null-coalescing, which
rescues from all falsey values in this case.


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

When the `package.json` file is the result of extracting a tarball
obtained from `npm pack`, it may have been processed by `npmjs.com`
during publishing, which can cause the `bundleDependencies` property to
appear with the value `false`. The null-coalescing (`??`) operator does
not rescue this properly and this results in a `TypeError`.

This is fixed by using `||` chaining instead of a null-coalescing, which
rescues from all falsey values in this case.
@RomainMuller RomainMuller requested review from MrArnoldPalmer and a team as code owners December 13, 2019 01:23
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@skinny85 skinny85 merged commit a2b11f1 into master Dec 13, 2019
@skinny85 skinny85 deleted the rmuller/fix-reflect branch December 13, 2019 17:39
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.

3 participants