Starcounter-Jack / JSON-Patch

Lean and mean Javascript implementation of the JSON-Patch standard (RFC 6902). Update JSON documents using delta patches.
MIT License
1.79k stars 215 forks source link

Export star as default #236

Closed tomalec closed 5 years ago

tomalec commented 5 years ago

Export all as default. Makes import foo from 'fast-json-patch' equal to import * as foo from 'fast-json-patch' for backward compatibility, after typescript update.

Fixes https://github.com/Starcounter-Jack/JSON-Patch/issues/233

warpech commented 5 years ago

LGTM. I verified it by running the tests locally in Node and in Chrome.

Also, I have cherry-picked the external API tests (https://github.com/Starcounter-Jack/JSON-Patch/pull/236/commits/18b4300510f77236a05f495407ab024db202a617) over last released versions:

As expected, these tests pass on 2.1.0 and fail on 2.2.0, which makes me convinced that this PR fixes the regression.