Skip to content

Commit

Permalink
fixes esm exports (#1269)
Browse files Browse the repository at this point in the history
OKTA-516702 fixes esm exports
  • Loading branch information
jaredperreault-okta authored Aug 15, 2022
1 parent e5a22a6 commit 2c66e80
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 6.7.5

### Fixes
- [#1269](https://github.com/okta/okta-auth-js/pull/1269) Fixes ESM exports
- Adds `default` export under `./browser` to support `[email protected]+`
- Adds work-around for webpack/webpack#13457 to support Module Federation (with ESM bundles)

## 6.7.4

### Fixes
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "@okta/okta-auth-js",
"description": "The Okta Auth SDK",
"version": "6.7.4",
"version": "6.7.5",
"homepage": "https://github.com/okta/okta-auth-js",
"license": "Apache-2.0",
"main": "build/cjs/index.js",
Expand All @@ -18,7 +18,8 @@
},
"browser": {
"types": "./build/lib/index.d.ts",
"import": "./build/esm/browser/index.js"
"import": "./build/esm/browser/index.js",
"default": "./build/esm/browser/index.js"
},
"types": "./build/lib/index.d.ts",
"default": "./build/dist/okta-auth-js.umd.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: Managing Phone Numbers
When she inputs an incorrect code
And she submits the form
# TODO: update error message once ciamx fix is in prod
Then she sees a banner message for "add phone number" that "Invalid factor id, no phone factor found."
Then she sees a banner message for "add phone number" that "This operation couldn't be completed as requested due to an issue with the specified authenticator."

Scenario: Mary deletes a phone number
Given she is on the Root View in an AUTHENTICATED state
Expand Down
3 changes: 3 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ fs.writeFileSync(`${BUILD_DIR}/package.json`, JSON.stringify(packageJSON, null,

// Add an extra package.json underneath ESM to indicate module type
// This helps tools like Jest identify this code as ESM
// (name and version are required for MFE)
fs.writeFileSync(`${BUILD_DIR}/esm/package.json`, JSON.stringify({
name: packageJSON.name,
version: packageJSON.version,
type: 'module'
}, null, 4));

Expand Down
2 changes: 0 additions & 2 deletions scripts/e2e-express-embedded-sign-in-widget.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


#!/bin/bash -x

source ${OKTA_HOME}/${REPO}/scripts/setup.sh
Expand Down
2 changes: 0 additions & 2 deletions scripts/e2e-express-web-no-oidc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


#!/bin/bash -x

source ${OKTA_HOME}/${REPO}/scripts/setup.sh
Expand Down
1 change: 0 additions & 1 deletion scripts/e2e-express-web-with-oidc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#!/bin/bash -x

source ${OKTA_HOME}/${REPO}/scripts/setup.sh
Expand Down
2 changes: 0 additions & 2 deletions scripts/e2e-react-embedded-auth-with-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ if [[ "${BACON_TASK}" == true ]]; then
echo "Running tests against trexcloud org"
export ISSUER=https://javascript-idx-sdk.trexcloud.com
export SPA_CLIENT_ID=0oa3r92jj01DWBeWC0g7
get_vault_secret_key devex/trex-js-idx-sdk-vars trex_client_secret CLIENT_SECRET
get_vault_secret_key devex/trex-js-idx-sdk-vars trex_idx_sdk_org_api_key OKTA_API_KEY
else
echo "Running tests against production (ok12) org"
export ISSUER=https://javascript-idx-sdk.okta.com
export SPA_CLIENT_ID=0oa17suj5x9khaVH75d7
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_client_secret CLIENT_SECRET
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_idx_sdk_org_api_key OKTA_API_KEY
fi

Expand Down
2 changes: 0 additions & 2 deletions scripts/e2e-static-spa.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


#!/bin/bash -x

source ${OKTA_HOME}/${REPO}/scripts/setup.sh
Expand Down
2 changes: 0 additions & 2 deletions scripts/e2e-webpack-spa.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


#!/bin/bash -x

source ${OKTA_HOME}/${REPO}/scripts/setup.sh
Expand Down

0 comments on commit 2c66e80

Please sign in to comment.