-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add package.json
"exports"
field
#1611
Conversation
Hello @flevi29 Do you know why we have a failure on Node 18? |
Somehow I might want to open a separate PR for updating Jest instead of doing it here. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1611 +/- ##
=======================================
Coverage 97.55% 97.55%
=======================================
Files 20 20
Lines 1513 1513
Branches 319 319
=======================================
Hits 1476 1476
Misses 37 37 ☔ View full report in Codecov by Sentry. |
As you wish. If the jest update is quick (does not impact a lot of files), you can do it here |
Waiting on #1621 |
The thing about this new In that case we'd need
But is this something we'd want? We had issues with people accidentally importing the source files, but I'm not sure if people so regularly use |
ccd4f31
to
9b83ef4
Compare
I finally might've rebased properly, changes are nice short and readable. I'm still learning git. |
Hi @flevi29, how are you?! Do you have a Discord user or a mail address to share with me? I want to discuss your contributions to our repositories in more detail, and I have a proposal that should give you more freedom to contribute. If you're interested, let me know! |
9b83ef4
to
f5decfc
Compare
Hi @flevi29, are you interested in continuing to work on these improvements? |
Hi @brunoocasali , sorry for not getting back to you. I might be interested in the future to work more on this, but it's just quite a bit of work and at the moment I don't really feel all that motivated. |
I see what you mean and I'm sorry for not being able to follow your work as close as I would like. In the past few months, we onboarded some contributors to assume the management of our libraries like ruby/rails, dart, php/symfony and python. We gave them full creative control over the source code and help when needed, which has worked nicely ever since. If you're interested, we could set that up with you here in the main js repos if that would fit you no pressure. In any case, your contributions are always welcomed 🙏 . |
f5decfc
to
78d4db4
Compare
I decided against including |
Actually this could be a breaking change for anyone who was importing anything other than what we have in the |
59ff50d
to
fd07974
Compare
3534f6c
to
7036557
Compare
8081b64
to
4d0f37c
Compare
@flevi29, sorry, can you fix git conflicts? |
4d0f37c
to
3749705
Compare
@curquiza fixed. |
…ing node type definitions, fixed bad tsconfig in rollup.config.js
2766274
to
d75ec0c
Compare
@curquiza fixed! From now on users will only be able to import/require files exported by this package, according to
This means that only More details about |
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.
bors merge
Pull Request
I am aiming to slowly try to update and simplify this repository, and maybe learn a thing or two along the way.
What does this PR do?
"exports"
field topackage.json
"main"
export for Node.jsrequire
orimport
was used, previously Node.js even in ESM mode always imported the commonjs version of this package, but now it can import the ESM versionnode:
specifiers to Node.js built-in module imports/requires@types/node
type definitions development dependencyjest
test runner doesn't supportnode:
specifiers, updatejest
(Update Jest #1622)because newer versions ofjest
doesn't include anymore"jest-environment-jsdom"
, add it as development dependencybecause newer versions ofjest
simplified snapshots, update them accordinglythis means replacingObject {
with{
andArray [
with[
Caution
This is a breaking change for anyone who was importing anything other than what we have in the
"exports"
package.json field. From now on only files from thepackage.json
"exports"
field can be imported.PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!