Skip to content

fix: windows path issue - #340

Merged
salihudickson merged 8 commits into
mainfrom
xd/win
Aug 12, 2024
Merged

salihudickson merged 8 commits into
mainfrom
xd/win

Conversation

@anuragxxd

@anuragxxd anuragxxd commented Jul 26, 2024 •

Copy link
Copy Markdown
Member

Description

Fixes #(issue)

Checklist

  • My code follows the contributing guidelines of this project.
  • I am aware that all my commits will be squashed into a single commit, using the PR title as the commit message.
  • I have performed a self-review of my own code.
  • I have commented my code in hard-to-understand areas.
  • I have updated the user-facing documentation to describe any new or changed behavior.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have not reduced the existing code coverage.

Comments

Summary by Sourcery

This pull request addresses a path issue on Windows by introducing a new utility function normalizePath to ensure consistent use of POSIX path separators. The function is applied to relevant file paths in the build script to prevent errors related to path inconsistencies.

  • Bug Fixes:
    • Fixed path issue on Windows by normalizing file paths to use POSIX separators.
  • Enhancements:
    • Added a utility function normalizePath to handle path normalization across different operating systems.

@vercel

vercel Bot commented Jul 26, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elixir-cloud-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 7:50pm

@changeset-bot

changeset-bot Bot commented Jul 26, 2024 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9038662

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2024 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide by Sourcery

This pull request addresses a Windows path issue by introducing a new utility function normalizePath in scripts/utils.js. This function converts Windows paths to POSIX paths. The normalizePath function is then used in scripts/build.js to ensure paths are correctly formatted during the build process.

File-Level Changes

Files Changes
scripts/utils.js
scripts/build.js
Introduced a new utility function normalizePath to handle Windows path issues and integrated it into the build script.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @anuragxxd - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adopting a more comprehensive path normalization solution that handles edge cases (e.g., UNC paths) and apply it consistently throughout the codebase. Libraries like path-browserify or normalize-path might be worth exploring for a robust, well-tested approach.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment thread scripts/utils.js Resolved
Comment thread scripts/build.js Resolved
Co-authored-by: salihuDickson <[email protected]>
@salihudickson

Copy link
Copy Markdown
Contributor

@sivangbagri, i've just pushed a fix for the issue you've been having, please check if it works.

@sivangbagri

Copy link
Copy Markdown
Contributor

Hii @salihudickson thanks for this but I am still facing the same error on building the design packages
image

@salihudickson

Copy link
Copy Markdown
Contributor

@sivangbagri, taking a look at the error now it seems this might be an issue with your node version. Please check it and if the version is lower than 18 then update it and rerun the dev script. I'll also add that as an engine requirement in the packageJson

@sivangbagri

Copy link
Copy Markdown
Contributor

@salihudickson I am currently on node 22.5.1 and npm version 10.8.2 , so I dont think thats the case...

@salihudickson

salihudickson commented Aug 7, 2024 •

Copy link
Copy Markdown
Contributor

@sivangbagri, from the error code it seems that your node version does not understand the assert keyword, and that's only a problem on older versions.
It might be the case that you have multiple versions of node installed and are not using the most recent version in this dir.

If the above stated is not the case then can we perhaps schedule a video call for today or tomorrow so that I can get real-time feedback, while I try to fix this.

And can you try building on your windows machine (not WSL), I've tried on mine and it seems to work fine, but I need a second opinion.

This branch was previously deployed

1 inactive deployment
Preview — 90386628 Deployed Aug 12, 2024 by vercel[bot]
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