Skip to content

Commit

Permalink
feat: added support for ESM (ECMAScript modules)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: due to added ESM module support Node.js version with
ESM implementation bugs are no longer supported, this only affects early
v13.x versions. The resulting Node.js semver range is
`^10.19.0 || >=12.0.0 < 13 || >=13.7.0` (also taking into account the
`got` dependency update)
  • Loading branch information
panva committed Sep 8, 2020
1 parent c72b5e8 commit 3ac37e8
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
- 10
- 12.0.0
- 12
- 13.0.0
- 13.7.0
- 13
- 14.0.0
- 14.2.0
- 14
os:
- ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions lib/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import mod from './index.js';

export default mod;
export const Issuer = mod.Issuer;
export const Registry = mod.Registry;
export const Strategy = mod.Strategy;
export const TokenSet = mod.TokenSet;
export const errors = mod.errors;
export const custom = mod.custom;
export const generators = mod.generators;
87 changes: 63 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,44 @@
],
"homepage": "https://github.com/panva/node-openid-client",
"repository": "panva/node-openid-client",
"funding": {
"url": "https://github.com/sponsors/panva"
},
"license": "MIT",
"author": "Filip Skokan <[email protected]>",
"exports": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
},
"main": "lib/index.js",
"types": "types/index.d.ts",
"files": [
"lib",
"types/index.d.ts"
],
"funding": {
"url": "https://github.com/sponsors/panva"
},
"main": "lib/index.js",
"types": "types/index.d.ts",
"scripts": {
"coverage": "nyc mocha test/**/*.test.js",
"lint": "eslint lib test",
"lint-ts": "npx typescript@~3.6.0 --build types",
"lint-fix": "eslint lib test --fix",
"lint-ts": "npx typescript@~3.6.0 --build types",
"test": "mocha test/**/*.test.js"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"dependencies": {
"base64url": "^3.0.1",
"got": "^11.5.2",
Expand Down Expand Up @@ -69,27 +89,46 @@
"timekeeper": "^2.2.0"
},
"engines": {
"node": "^10.19.0 || >=12.0.0"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
"node": "^10.19.0 || >=12.0.0 < 13 || >=13.7.0 < 14 || >= 14.2.0"
},
"standard-version": {
"scripts": {
"postchangelog": "sed -i '' -e 's/### \\[/## [/g' CHANGELOG.md"
}
},
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "style",
"hidden": true
},
{
"type": "refactor",
"section": "Refactor",
"hidden": true
},
{
"type": "perf",
"hidden": true
},
{
"type": "test",
"hidden": true
}
]
}
}

0 comments on commit 3ac37e8

Please sign in to comment.