-
Notifications
You must be signed in to change notification settings - Fork 33
feat: move the module to be esm #221
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
Conversation
To do that I've also switched jest for vitest **NOTE** I'm soon going to be potentially without Internet connection. I don't want to merge this and just walk away, so I'll need some :+1: and backup peeps on this one.
fwiw, it works for me (once I installed @testing-library/dom) |
I attempted to apply the patched branch
Full disclosure. Module resolution errors are not my cup of tea, so it's perfectly possible that I don't know how to apply the fix properly. Open to suggestions here. Repo with patched branch: Steps I took from minimal example repo to patch repo: Let me know if I goofed on applying the fix @yanick |
Okay. I just realized I need to target The fix works for me too! Thank you for the quick turn around time. Only other suggestion I have is to perhaps update the peer dependency designation wrt svelte:
working and patched example: Update: |
Heh. You fixed it as I was finding the same thing. ^.^
Yeah, we should probably do that once svelte 4.0.0 gets out of alpha.
Woo! Now, I'm about to be offline for a few days, so I won't do the mistake of merging and going dark. :turn to the whole room: Do we have another maintainer who can check this PR and, if we merge, keep eyes on the status of things for the next few days? |
Update!: Spoke too soon. Found this error on my production branch above.
|
Could be from the pure.js in the root directory. I tweaked it, try again? |
Success. No issues now. |
I AM A GOD! \o/ |
🐐 🤣 |
package.json
Outdated
"husky": "^7.0.1", | ||
"jest": "^27.0.0", | ||
"jest": "^29.5.0", |
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.
Do we need jest and Vitest installed? (also jest-environment-jsdom
and svelte-jester
)
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.
Oops. Leftover. Removing...
.eslintrc.cjs
Outdated
@@ -3,29 +3,23 @@ module.exports = { | |||
env: { | |||
browser: true, | |||
es6: true, | |||
jest: true | |||
jest: true, |
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.
Do we still need this line if we're using Vitest?
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.
Hmm... Maybe for the globals. Let's see ! :goes to console:
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.
Switched to the vitest env
@@ -29,21 +30,18 @@ | |||
"e2e" | |||
], | |||
"files": [ | |||
"dist", |
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.
Does probably also need src/pure.js
and src/index.js
now
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.
True!
package.json
Outdated
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"eslint-plugin-svelte3": "^4.0.0", |
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 is the older original package. there's now an eslint-plugin-svelte
that you might want to migrate to
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.
Migrated!
package.json
Outdated
"src/pure.js", | ||
"src/index.js", |
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.
I would make this src/
so that things don't unexpectedly break if you add another file
"src/pure.js", | |
"src/index.js", | |
"src/", |
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.
Point. Done!
package.json
Outdated
@@ -29,21 +30,20 @@ | |||
"e2e" | |||
], | |||
"files": [ | |||
"dist", | |||
"src/pure.js", | |||
"src/index.js", | |||
"dont-cleanup-after-each.js", | |||
"pure.js", |
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.
I don't think you need this since it's in src
now. not sure what dont-cleanup-after-each
is and whether you need that one or not
"pure.js", |
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.
Removed both. dont-cleanup-after-each
seems to be a helper package for setting the env variable that is not used anywhere anyway.
package.json
Outdated
"eslint": "^8.42.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-node": "^11.1.0", |
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.
I think this one is no longer maintained so folks use eslint-plugin-n
now
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.
Good to know! Done!
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
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.
I would still recommend putting exports
in the package.json
. lgtm besides that
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Svelte 4 will be released imminently. It could be good to merge this in order to avoid any bug reports |
I can merge, but I'm away from any keyboards for the next 2 weeks, which means that if the branch introduce any problem, things will be broken for a while. Is there any other maintainer that can jump in if this happens?
…On Wed, 21 Jun 2023, at 5:29 PM, Ben McCann wrote:
Svelte 4 will be released imminently. It could be good to merge this in order to avoid any bug reports
—
Reply to this email directly, view it on GitHub <#221 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAE34TDKW4JUJNCX7LY5A3XMMHMFANCNFSM6AAAAAAY5F7G2Y>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I don't have any historical familiarity with this library, but can try to take a look if any issues pop up |
Okie. There goes nothing! |
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
To do that I've also switched jest for vitest
NOTE I'm soon going to be potentially without Internet connection. I don't want to merge this and just walk away, so I'll need some 👍 and backup peeps on this one.
Might fix #220
BREAKING CHANGE: moves the package from cjs to esm.