diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81adfeb76f..cd3356c480 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: - 11 - 12.0.0 - 12 - - 13.0.0 + - 13.7.0 - 13 - 14.0.0 - 14 diff --git a/lib/index.mjs b/lib/index.mjs new file mode 100644 index 0000000000..0dd40d1003 --- /dev/null +++ b/lib/index.mjs @@ -0,0 +1,9 @@ +import mod from './index.js' + +export default mod +export const JWE = mod.JWE +export const JWK = mod.JWK +export const JWKS = mod.JWKS +export const JWS = mod.JWS +export const JWT = mod.JWT +export const errors = mod.errors diff --git a/package.json b/package.json index 1f61657bfc..4921b732e1 100644 --- a/package.json +++ b/package.json @@ -45,18 +45,22 @@ "funding": "https://github.com/sponsors/panva", "license": "MIT", "author": "Filip Skokan ", + "exports": { + "import": "./lib/index.mjs", + "require": "./lib/index.js" + }, + "main": "lib/index.js", + "types": "types/index.d.ts", "files": [ "lib/**/*.js", "LICENSE_THIRD_PARTY", "types/index.d.ts" ], - "main": "lib/index.js", - "types": "types/index.d.ts", "scripts": { "coverage": "c8 ava", "lint": "standard", - "lint-ts": "npx typescript@~3.6.0 --build types", "lint-fix": "standard --fix", + "lint-ts": "npx typescript@~3.6.0 --build types", "test": "ava", "watch": "ava --watch" }, @@ -90,7 +94,7 @@ "standard": "^14.3.1" }, "engines": { - "node": ">=10.13.0" + "node": ">=10.13.0 < 13 || >=13.7.0" }, "standard": { "parser": "babel-eslint"