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 micromark-build in dev folders #176

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Conversation

puqeko
Copy link
Contributor

@puqeko puqeko commented Jun 16, 2024

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Problem: Cloning micromark (main branch) into ~/dev/ (or any path containing /dev/) and running npm install && npm run build fails with Cannot find module....

Cause: micromark-build replaces the first occurrence of /dev/ in the full file path instead of the last occurrence when moving .js files up a directory.

Proposed Solution: This PR adds a negative lookahead to the regular expression in .replace so that the last occurrence of /dev/ is replaced correctly.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jun 16, 2024
@wooorm wooorm changed the title micromark-build fails in paths containing /dev/ Fix micromark-build in dev folders Jun 17, 2024
@wooorm wooorm merged commit 6038803 into micromark:main Jun 17, 2024
15 checks passed
@wooorm wooorm added the 💪 phase/solved Post is done label Jun 17, 2024
@wooorm
Copy link
Member

wooorm commented Jun 17, 2024

Thanks! :)

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jun 17, 2024
@puqeko puqeko deleted the fix-build branch June 17, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants