Skip to content

Commit

Permalink
Update usage-reporting-protobuf to have main field (#7095)
Browse files Browse the repository at this point in the history
@apollo/usage-reporting-protobuf should define a main/module field in
package.json, same as @apollo/server does. The "exports" field doesn't
work everywhere yet still (ex. jest, or at least old versions of jest,
don't respect it).

Co-authored-by: David Glasser <[email protected]>
  • Loading branch information
alex-statsig and glasser authored Oct 28, 2022
1 parent 1ba2060 commit 72111f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-pigs-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apollo/usage-reporting-protobuf': patch
---

Include `main` and `module` fields in package.json for build tools that look for them instead of `exports`.
2 changes: 2 additions & 0 deletions packages/usage-reporting-protobuf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"types": "./generated/protobuf.d.ts"
}
},
"main": "generated/protobuf.cjs",
"module": "generated/protobuf.mjs",
"types": "generated/protobuf.d.ts",
"scripts": {
"generate": "rm -rf generated && mkdir generated && npm run pbjs-cjs && npm run pbjs-esm && npm run pbts",
Expand Down

0 comments on commit 72111f9

Please sign in to comment.