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-cdk: Replace __dirname #26054

Open
2 tasks
cyntheticfox opened this issue Jun 20, 2023 · 1 comment
Open
2 tasks

aws-cdk: Replace __dirname #26054

cyntheticfox opened this issue Jun 20, 2023 · 1 comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3

Comments

@cyntheticfox
Copy link

Describe the feature

Replace the global variable __dirname used with an alternative that properly handles special characters and is more widely supported

Use Case

I've seen issues in #21161, and #18470, and may be running into issues myself due to path resolution shenanigans on my system with the __dirname global variable.

Proposed Solution

It seems feasible from my limited knowledge of Node.js to use path.dirname(url.fileURLToPath(import.meta.url)) instead, given its introduction back in Node.js 10.12.

Other Information

No response

Acknowledgements

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

CDK version used

2.80.0

Environment details (OS name and version, etc.)

NixOS 23.05

@cyntheticfox cyntheticfox added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 20, 2023
@pahud
Copy link
Contributor

pahud commented Jun 20, 2023

Can you elaborate more about this issue? What is the current behavior and what is the expected behavior? A small code snippet provided would be highly appreciated as well.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 20, 2023
@peterwoodworth peterwoodworth removed their assignment Jun 20, 2023
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

3 participants