-
Notifications
You must be signed in to change notification settings - Fork 75
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
chore: move to native ESM during dev + jsdoc TS #20
Conversation
@@ -1 +0,0 @@ | |||
module.exports = require('kcd-scripts/husky') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be an ESM module with our configuration now. But I'm planning on updating the version of husky so I just removed it for now.
Just a note that your tests seem to import leftpad, which is probably unnecessary given that vanilla JS has that functionality built in as String.padStart, obviating a reasonable chunk of that test file. |
@Pomax, thanks. It's just for the test. We don't need the functionality, we're just testing a feature of mdx-bundler :) |
I think this should work. Would love feedback from folks on this. |
src/__tests__/index.js
Outdated
`) | ||
|
||
assert.snapshot(error.message, `Build failed with 1 error: | ||
__mdx_bundler_fake_dir__/demo.tsx:1:7: error: [inMemory] Could not resolve "./blah-blah" from "./demo.tsx"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing on Windows. Changing to:
assert.snapshot(error.message, `Build failed with 1 error:
__mdx_bundler_fake_dir__/demo.tsx:1:7: error: [inMemory] Could not resolve "./blah-blah" from ".${path.sep}demo.tsx"`)
does fix the problem, however I suspect any automatic updates to the snapshot will break it again in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
uvu doesn't auto-update snapshots, but I switched it to .equal
anyway. Thanks!
This reverts commit 727ef9f.
🎉 This PR is included in version 3.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This is the solution I hate the least. Running into this on the tests though:
Reproduction is in this PR: #20
I poked around a bit but have no idea why this could be happening. Didn't find anyone else with the same problem either 😅
Oh, and I only got that when I upgraded to
27.0.0-next.7
. The current version of jest I'm on is26.6.3
and with that I get:I haven't had a chance to dig on that yet.
Not sure what that's all about... Everything else seems to work pretty well. I've tried to comment around the code that is a little weird.