Add package.json export to pg-cloudflare#3506
Conversation
|
thanks for the PR unfortunately its not passing lint check. looks like the change produced invalid json. Trailing commas are not allowed in JSON. |
|
Sorry about that, fixed |
|
hey! tests passed! thanks for the pr! |
|
Do you want to add a test here that does the requiring? That way this code will be tested for future generations. 😄 |
|
Gonna be completely honest here - I would write it myself but I still find the process of pushing to a contributor's PR on github to be just too onerous to re-figure out every time I have to do it. I can write a diff here you can include on your own code. Add this code to this file inside the describe block it('should be able to import package.json`, () => {
assert.ok(require.resolve('pg-cloudflare/package.json'))
}) |
|
if you find it easier you can close this PR and push directly to main. It would be great to add support./package.json to other packages too |
|
yeah good call i'll just do a follow-on PR |
Similar to #3488
I currently use the
require.resolve(${package}/package.json)to resolve the location of packages, not having package.json exported breaks this kind of tools