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(node): directory separators are inconsistent between platforms in tasks.json and package.json #3387

Merged
merged 3 commits into from
Feb 24, 2024

Conversation

gmeligio
Copy link
Contributor

Related to #3284 (comment)

Changelog

  1. Use POSIX path for tasks with lambda entrypoint.

Screenshot 2024-02-23 162624

  1. Normalize NodeProject.artifactsJavascriptDirectory, resulting in dist\\js being written on Windows instead of dist/js.

Screenshot 2024-02-23 162616


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

@gmeligio gmeligio marked this pull request as ready for review February 23, 2024 17:04
@mrgrain mrgrain changed the title fix(lambda,node): directory separators are inconsistent between platforms in tasks.json and package.json fix(node): directory separators are inconsistent between platforms in tasks.json and package.json Feb 24, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@a5f5672). Click here to learn what that means.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3387   +/-   ##
=======================================
  Coverage        ?   96.33%           
=======================================
  Files           ?      191           
  Lines           ?    37299           
  Branches        ?     3480           
=======================================
  Hits            ?    35932           
  Misses          ?     1367           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot merged commit 2aa861d into projen:main Feb 24, 2024
14 checks passed
@gmeligio gmeligio deleted the lambda-path branch February 27, 2024 18:31
mergify bot pushed a commit that referenced this pull request Feb 28, 2024
…latforms in tasks.json and package.json (#3406)

Related to #3284 (comment)

This is the second attempt at fixing the directory separator issue for lambda entrypoints, which was started in #3387. 

I tried adding unit tests for `renderBundleName`. Unfortunately, this can't be unit-tested now because NodeJS exports the `path` package for the Linux platform instead of Windows at import time and not at runtime.
https://github.com/nodejs/node/blob/f28ccd3941e70a825786eff7e28f59014ac76ac9/lib/path.js#L1546

I tested it locally in an example project, and it looks like it's fixed now.
![image](https://github.com/projen/projen/assets/22875166/4f98fb92-0a45-4d83-845c-152e48ded763)


---
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants