Skip to content

Commit

Permalink
fix: build for esm correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sampullman committed Dec 15, 2023
1 parent d5e3973 commit c8c81c6
Show file tree
Hide file tree
Showing 11 changed files with 1,326 additions and 984 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ env:
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout code into workspace directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/env-setup
Expand All @@ -20,10 +20,10 @@ jobs:

check-format:
name: Check Format
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout code into workspace directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/env-setup
Expand All @@ -32,10 +32,10 @@ jobs:

tests:
name: Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout code into workspace directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/env-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/env-setup
Expand Down
2 changes: 1 addition & 1 deletion lib/fetchApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
FetchApiOptions,
FetchApiConfig,
FetchRequestConfig,
} from './types';
} from './types.js';
import {
prepareBody,
basicAuth,
Expand Down
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FetchApi } from './fetchApi';
import { FetchApi } from './fetchApi.js';

export * from './types';
export * from './types.js';
export * from './util';

export { FetchApi };
2 changes: 1 addition & 1 deletion lib/util/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BasicAuth, FetchRequestConfig } from '../types';
import { BasicAuth, FetchRequestConfig } from '../types.js';

export function authConfig(config: FetchRequestConfig): FetchRequestConfig {
return {
Expand Down
8 changes: 4 additions & 4 deletions lib/util/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './auth';
export * from './i-json-object';
export * from './request';
export * from './array';
export * from './auth.js';
export * from './i-json-object.js';
export * from './request.js';
export * from './array.js';
6 changes: 3 additions & 3 deletions lib/util/request.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RequestData, RequestParams, ResolvedRequestParams } from '../types';
import { arrayToQuery } from './array';
import { objectToQuery } from './object';
import { RequestData, RequestParams, ResolvedRequestParams } from '../types.js';
import { arrayToQuery } from './array.js';
import { objectToQuery } from './object.js';

type Filterable = {
[key: string]: string;
Expand Down
32 changes: 15 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,20 @@
},
"homepage": "https://github.com/sampullman/fetch-api#readme",
"devDependencies": {
"@types/btoa": "^1.2.3",
"@types/jest": "^29.4.0",
"@types/node": "^18.15.0",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"btoa": "^1.2.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "^2.8.4",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^4.9.5"
"@types/jest": "^29.5.11",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.1.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit c8c81c6

Please sign in to comment.