APIDevTools / json-schema-ref-parser

Parse, Resolve, and Dereference JSON Schema $ref pointers in Node and browsers
https://apitools.dev/json-schema-ref-parser
MIT License
952 stars 227 forks source link

ES Modules #295

Closed jcmosc closed 1 year ago

jcmosc commented 1 year ago

(This PR builds off https://github.com/APIDevTools/json-schema-ref-parser/pull/294)

Convert the project to ES Modules and implements dual CommonJS/ES module exports.

jcmosc commented 1 year ago

Hey @philsturgeon this now implements dual CommonJS/ES module support and is ready to merge.

The one thing to call out is that the minimum Node version is now 17, not 14 according to the engines property in package.json. Though it only matters for running tests and it should still work in 14.

philsturgeon commented 1 year ago

I’m ok increasing versions under those terms as we’re aiming for EAM in a major anyway. Now we’ve merged the other PR can we update and see if this is good to go?

Thank you so much for your support.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3897768158


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/index.js 5 6 83.33%
<!-- Total: 23 24 95.83% -->
Totals Coverage Status
Change from base Build 3897133363: 1.7%
Covered Lines: 750
Relevant Lines: 787

💛 - Coveralls
jcmosc commented 1 year ago

Yep, looks like all checks have passed

jcmosc commented 1 year ago

oh there's conflicts...

jcmosc commented 1 year ago

ok fixed

philsturgeon commented 1 year ago

Thank you @jamesmoschou! This is a great update.

I had to manually release it because semantic-release has gone off the rails, but hopefully thats working ok.

Would you be up for maintaining this package because I am working in the woods 90% of the time now and don't want to be stressing about this when I get back to a computer.

I'm also asking if https://github.com/readmeio/json-schema-ref-parser/issues/64 can take over, which may just involve merging some of the recent changes and me pointing this package to them.

jcmosc commented 1 year ago

Hey @philsturgeon I can help maintain this package. Though I mean maintain in the literal sense, I wouldn't be developing any new feature requests.

Looks like the node engine breaking change snuck in to v9.* version instead of v10. I can update this is you set up the permission :)

coffeebe4code commented 1 year ago

Sorry, referencing my comment here. https://github.com/APIDevTools/json-schema-ref-parser/pull/300#issuecomment-1400809753

It looks like this is the one that broke our project.

philsturgeon commented 1 year ago

@coffeebe4code fixed in 9.1.2.