diff --git a/.bacon.yml b/.bacon.yml index 0d47323..46cb202 100644 --- a/.bacon.yml +++ b/.bacon.yml @@ -20,9 +20,23 @@ test_suites: script_name: e2e criteria: MERGE queue_name: small - - name: publish + - name: unit-v6 script_path: /root/okta/okta-vue/scripts sort_order: '4' + timeout: '10' + script_name: unit-v6 + criteria: MERGE + queue_name: small + - name: e2e-v6 + script_path: /root/okta/okta-vue/scripts + sort_order: '5' + timeout: '10' + script_name: e2e-v6 + criteria: MERGE + queue_name: small + - name: publish + script_path: /root/okta/okta-vue/scripts + sort_order: '6' timeout: '60' script_name: publish criteria: MERGE diff --git a/CHANGELOG.md b/CHANGELOG.md index e6a6b44..793a5b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -[authState]: https://github.com/okta/okta-auth-js#authstatemanager +# 5.5.0 + +### Features +- [#110](https://github.com/okta/okta-vue/pull/110) Adds support for `@okta/okta-auth-js` `7.x` + - bumps minimum node version to `14` # 5.4.0 diff --git a/package.json b/package.json index 2fc6043..3b69b43 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@babel/core": "^7.12.3", "@babel/plugin-transform-runtime": "^7.12.1", "@babel/preset-env": "^7.12.1", - "@okta/okta-auth-js": "~6.7.5", + "@okta/okta-auth-js": "^7.0.0", "@rollup/plugin-babel": "^5.2.1", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-replace": "^2.3.4", @@ -113,7 +113,7 @@ "test/e2e" ], "peerDependencies": { - "@okta/okta-auth-js": "^5.8.0 || ^6.0.0", + "@okta/okta-auth-js": "^5.8.0 || ^6.0.0 || ^7.0.0", "vue": "^3.0.0", "vue-router": "^4.0.3" } diff --git a/scripts/e2e-v6.sh b/scripts/e2e-v6.sh new file mode 100644 index 0000000..aedd4dd --- /dev/null +++ b/scripts/e2e-v6.sh @@ -0,0 +1,32 @@ +#!/bin/bash -x + +source ${OKTA_HOME}/${REPO}/scripts/setup.sh + +setup_service xvfb start +setup_service java 1.8.222 +setup_service google-chrome-stable 87.0.4280.66-1 + +export TEST_SUITE_TYPE="junit" +export TEST_RESULT_FILE_DIR="${REPO}/test-reports/e2e" + +export ISSUER=https://samples-javascript.okta.com/oauth2/default +export SPA_CLIENT_ID=0oapmwm72082GXal14x6 +export USERNAME=george@acme.com +get_secret prod/okta-sdk-vars/password PASSWORD + +if ! yarn add -DW --ignore-scripts @okta/okta-auth-js@^6; then + echo "auth-js v6.x could not be installed" + exit ${FAILED_SETUP} +fi + +sh ~/okta/okta-vue/scripts/update_se_drivers.sh +cd ~/okta/okta-vue/test/e2e + +if ! yarn e2e; then + echo "e2e tests failed! Exiting..." + exit ${TEST_FAILURE} +fi + +echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE} +echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE} +exit ${PUBLISH_TYPE_AND_RESULT_DIR} diff --git a/scripts/publish.sh b/scripts/publish.sh index 343adb5..6e30ca9 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -9,6 +9,7 @@ export TEST_SUITE_TYPE="build" # Install required dependencies export PATH="${PATH}:$(yarn global bin)" yarn global add @okta/ci-append-sha +yarn global add @okta/ci-pkginfo if [ -n "${action_branch}" ]; then @@ -32,6 +33,9 @@ if ! npm publish --registry ${REGISTRY}; then exit ${PUBLISH_ARTIFACTORY_FAILURE} fi +FINAL_PUBLISHED_VERSION="$(ci-pkginfo -t pkgsemver)" +log_custom_message "Published Version" "${FINAL_PUBLISHED_VERSION}" + popd exit ${SUCCESS} diff --git a/scripts/setup.sh b/scripts/setup.sh index 15932c4..d449d3b 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -10,7 +10,7 @@ export PATH="${PATH}:$(yarn global bin)" # Install required node version export NVM_DIR="/root/.nvm" -setup_service node v12.13.0 +setup_service node v14.19.3 cd ${OKTA_HOME}/${REPO} diff --git a/scripts/unit-v6.sh b/scripts/unit-v6.sh new file mode 100644 index 0000000..c46176c --- /dev/null +++ b/scripts/unit-v6.sh @@ -0,0 +1,21 @@ +#!/bin/bash -x + +source ${OKTA_HOME}/${REPO}/scripts/setup.sh + +export TEST_SUITE_TYPE="junit" +export TEST_RESULT_FILE_DIR="${REPO}/test-reports/unit" + +if ! yarn add -DW --ignore-scripts @okta/okta-auth-js@^6; then + echo "auth-js v6.x could not be installed" + exit ${FAILED_SETUP} +fi + +# Run jest with "ci" flag +if ! yarn test:unit --ci; then + echo "unit failed! Exiting..." + exit ${TEST_FAILURE} +fi + +echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE} +echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE} +exit ${PUBLISH_TYPE_AND_RESULT_DIR} diff --git a/yarn.lock b/yarn.lock index 211bde3..3358914 100644 --- a/yarn.lock +++ b/yarn.lock @@ -998,14 +998,6 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/runtime-corejs3@^7.17.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz#6f02c5536911f4b445946a2179554b95c8838635" - integrity sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw== - dependencies: - core-js-pure "^3.20.2" - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.8.4": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" @@ -1412,17 +1404,37 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@okta/okta-auth-js@~6.7.5": - version "6.7.6" - resolved "https://registry.yarnpkg.com/@okta/okta-auth-js/-/okta-auth-js-6.7.6.tgz#31745df22f31e981d18bd0ec1fe85fcb9aa1b4c7" - integrity sha512-HUhy0+cccTPRRvlswDkeRt205cAPm+Z+51Xm8nTsnKn5+tWVDZ86Rq8w7JDsr+HjUQGZpdUxRP3Er+vEcoVcgg== +"@okta/okta-auth-js@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@okta/okta-auth-js/-/okta-auth-js-7.0.0.tgz#d83acb76394ebc7d019d922f0e319fe6655c41ac" + integrity sha512-tF+OiaAHNHc5ACKUR5lynX7LQyw9+pqKj8hzSY+E6OCKucYudjMg87AdCdyBxpFgxrirRlAFYv08sM1wwn0Eeg== dependencies: "@babel/runtime" "^7.12.5" - "@babel/runtime-corejs3" "^7.17.0" "@peculiar/webcrypto" "^1.4.0" Base64 "1.1.0" atob "^2.1.2" - broadcast-channel "4.13.0" + broadcast-channel "~4.17.0" + btoa "^1.2.1" + core-js "^3.6.5" + cross-fetch "^3.1.5" + js-cookie "^3.0.1" + jsonpath-plus "^6.0.1" + node-cache "^5.1.2" + p-cancelable "^2.0.0" + text-encoding "^0.7.0" + tiny-emitter "1.1.0" + webcrypto-shim "^0.1.5" + xhr2 "0.1.3" + +"@okta/okta-auth-js@https://artifacts.aue1d.saasure.com/artifactory/npm-topic/@okta/okta-auth-js/-/@okta/okta-auth-js-7.0.0-g1293871.tgz": + version "7.0.0-g1293871" + resolved "https://artifacts.aue1d.saasure.com/artifactory/npm-topic/@okta/okta-auth-js/-/@okta/okta-auth-js-7.0.0-g1293871.tgz#56c1dc15bacd24560980b1384fb4d19004e92a57" + dependencies: + "@babel/runtime" "^7.12.5" + "@peculiar/webcrypto" "^1.4.0" + Base64 "1.1.0" + atob "^2.1.2" + broadcast-channel "~4.17.0" btoa "^1.2.1" core-js "^3.6.5" cross-fetch "^3.1.5" @@ -2993,14 +3005,12 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -broadcast-channel@4.13.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.13.0.tgz#21387b2602b9e9ec3b97b03bd8a8d2c198352ff6" - integrity sha512-fcDr8QNJ4SOb6jyjUNZatVNmcHtSWfW4PFcs4xIEFZAtorKCIFoEYtjIjaQ4c0jrbr/Bl8NIwOWiLSyspoAnEQ== +broadcast-channel@~4.17.0: + version "4.17.0" + resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.17.0.tgz#599d44674b09a4e2e07af6da5d03b45ca8bffd11" + integrity sha512-r2GSQMNgZv7eAsbdsu9xofSjc3J2diCQTPkSuyVhLBfx8fylLCVhi5KheuhuAQBJNd4pxqUyz9U6rvdnt7GZng== dependencies: "@babel/runtime" "^7.16.0" - detect-node "^2.1.0" - microtime "3.0.0" oblivious-set "1.1.1" p-queue "6.6.2" rimraf "3.0.2" @@ -3479,11 +3489,6 @@ core-js-compat@^3.21.0, core-js-compat@^3.22.1: browserslist "^4.21.1" semver "7.0.0" -core-js-pure@^3.20.2: - version "3.23.4" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.4.tgz#aba5c7fb297063444f6bf93afb0362151679a012" - integrity sha512-lizxkcgj3XDmi7TUBFe+bQ1vNpD5E4t76BrBWI3HdUxdw/Mq1VF4CkiHzIKyieECKtcODK2asJttoofEeUKICQ== - core-js@^2.4.0: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" @@ -3882,7 +3887,7 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -detect-node@2.1.0, detect-node@^2.0.4, detect-node@^2.1.0: +detect-node@2.1.0, detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== @@ -6678,12 +6683,10 @@ loupe@2.3.4: dependencies: get-func-name "^2.0.0" -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== lru-cache@^4.0.1, lru-cache@^4.1.2: version "4.1.5" @@ -6783,14 +6786,6 @@ micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -microtime@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/microtime/-/microtime-3.0.0.tgz#d140914bde88aa89b4f9fd2a18620b435af0f39b" - integrity sha512-SirJr7ZL4ow2iWcb54bekS4aWyBQNVcEDBiwAz9D/sTgY59A+uE8UJU15cp5wyZmPBwg/3zf8lyCJ5NUe1nVlQ== - dependencies: - node-addon-api "^1.2.0" - node-gyp-build "^3.8.0" - mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -7029,11 +7024,6 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -node-addon-api@^1.2.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" - integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== - node-cache@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/node-cache/-/node-cache-5.1.2.tgz#f264dc2ccad0a780e76253a694e9fd0ed19c398d" @@ -7053,11 +7043,6 @@ node-forge@^1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -node-gyp-build@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.9.0.tgz#53a350187dd4d5276750da21605d1cb681d09e25" - integrity sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A== - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"