diff --git a/packages/http-client/package-lock.json b/packages/http-client/package-lock.json index d109c490..2a625161 100644 --- a/packages/http-client/package-lock.json +++ b/packages/http-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@actions/http-client", - "version": "3.0.2", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@actions/http-client", - "version": "3.0.2", + "version": "4.0.0", "license": "MIT", "dependencies": { "tunnel": "^0.0.6", diff --git a/packages/http-client/package.json b/packages/http-client/package.json index ab4c38c1..4f072966 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@actions/http-client", - "version": "3.0.2", + "version": "4.0.0", "description": "Actions Http Client", "keywords": [ "github", @@ -9,8 +9,19 @@ ], "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", "license": "MIT", + "type": "module", "main": "lib/index.js", "types": "lib/index.d.ts", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "import": "./lib/index.js" + }, + "./lib/auth": { + "types": "./lib/auth.d.ts", + "import": "./lib/auth.js" + } + }, "directories": { "lib": "lib", "test": "__tests__" diff --git a/packages/http-client/src/auth.ts b/packages/http-client/src/auth.ts index 58938ac4..b856a310 100644 --- a/packages/http-client/src/auth.ts +++ b/packages/http-client/src/auth.ts @@ -1,6 +1,6 @@ import * as http from 'http' -import * as ifm from './interfaces' -import {HttpClientResponse} from './index' +import * as ifm from './interfaces.js' +import {HttpClientResponse} from './index.js' export class BasicCredentialHandler implements ifm.RequestHandler { username: string diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index 2aee17dc..2f940949 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/src/index.ts @@ -2,9 +2,9 @@ import * as http from 'http' import * as https from 'https' -import * as ifm from './interfaces' +import * as ifm from './interfaces.js' import * as net from 'net' -import * as pm from './proxy' +import * as pm from './proxy.js' import * as tunnel from 'tunnel' import {ProxyAgent} from 'undici' diff --git a/packages/http-client/src/interfaces.ts b/packages/http-client/src/interfaces.ts index 96b0fec7..e1ffcd39 100644 --- a/packages/http-client/src/interfaces.ts +++ b/packages/http-client/src/interfaces.ts @@ -1,6 +1,6 @@ import * as http from 'http' import * as https from 'https' -import {HttpClientResponse} from './index' +import {HttpClientResponse} from './index.js' export interface HttpClient { options( diff --git a/packages/http-client/tsconfig.json b/packages/http-client/tsconfig.json index 222ca415..181e17db 100644 --- a/packages/http-client/tsconfig.json +++ b/packages/http-client/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "outDir": "./lib", "rootDir": "./src", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", "declaration": true, }, "include": [