HomePhabricator

[mock-chronik-client] Improve path defs for typescript build

Description

[mock-chronik-client] Improve path defs for typescript build

Summary:
Using this lib throws occasional warnings with mocha (related to the "main" key in package.json being incorrect) -- or errors with jest, saying cannot parse the "import" statement in index.ts -- which, as a lib, apps that use mock-chronik-client should only be looking at dist and not index.ts.

Update package.json so routes make this clear.

Tested by publishing 2.1.3-rc -- this version corrects bugs seen in apps that use this lib for tests (vs 2.1.2).

Test Plan: In an app that uses mock-chronik-client for tests but sees jest errors, npm i mock-chronik-client@rc (this version); errors go away

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D17542

Details

Provenance
bytesofmanAuthored on Thu, Jan 16, 04:33
bytesofmanPushed on Thu, Jan 16, 13:23
Reviewer
Restricted Project
Differential Revision
D17542: [mock-chronik-client] Improve path defs for typescript build
Parents
rABC36524d889f0e: [mock-chronik-client] Clean up test mocks file
Branches
Unknown
Tags
Unknown