From 57922a9cb46810fb8ccd9eb87fcdeb5bc33ba9dd Mon Sep 17 00:00:00 2001 From: lmachens Date: Tue, 26 Apr 2022 15:12:51 +0200 Subject: [PATCH] Create package.json for esm and cjs distributions --- fixup | 19 +++++++++++++++++++ package.json | 2 +- src/fetcher.ts | 2 +- src/index.ts | 6 +++--- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100755 fixup diff --git a/fixup b/fixup new file mode 100755 index 00000000..bb4144e8 --- /dev/null +++ b/fixup @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Add package.json files to cjs/mjs subtrees +# + +cat >dist/cjs/package.json <dist/esm/package.json < method === 'post' || diff --git a/src/index.ts b/src/index.ts index a248f69c..3652169d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -import { Fetcher } from './fetcher' -import { arrayRequestBody } from './utils' +import { Fetcher } from './fetcher.js' +import { arrayRequestBody } from './utils.js' import type { ApiResponse, @@ -14,7 +14,7 @@ import type { TypedFetch, } from './types' -import { ApiError } from './types' +import { ApiError } from './types.js' export type { OpArgType,