Skip to content

Commit

Permalink
Merge branch 'master' into FR-14174-add-jest-testing-to-frontegg-reac…
Browse files Browse the repository at this point in the history
…t-sdk
  • Loading branch information
yuvalotem1 committed Nov 21, 2023
2 parents 1be9a2f + 6953bff commit 48b9f93
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 61 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "(▶) Publish Alpha Version"
on:
workflow_dispatch:
jobs:
createAlphaVersion:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install Dependencies and Build Packages
run: make init
- name: Git Identity
run: |
git config --global user.name 'frontegg'
git config --global user.email '[email protected]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Authenticate with Registry
run: |
yarn logout
echo "init-author-name=Frontegg LTD" > .npmrc
echo "[email protected]" >> .npmrc
echo "init-author-url=https://frontegg.com" >> .npmrc
echo "init-license=MIT" >> .npmrc
echo "always-auth=true" >> .npmrc
echo "registry=https://registry.npmjs.org" >> .npmrc
echo "_authToken=$NPM_TOKEN" >> .npmrc
echo "@frontegg:registry=https://registry.npmjs.org" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Commit Version UP
run: |
yarn lerna version patch --no-git-tag-version --yes --no-push --force-publish
yarn update-version
yarn prettier-hook
- name: "Set incremented version"
uses: actions/github-script@v6
id: 'incremented-version'
with:
result-encoding: string
script: |
const {default: fs} = await import('fs');
const {version} = JSON.parse(fs.readFileSync('./lerna.json', {encoding: "utf-8"}));
return version;
- name: Publish Pre-Release version to NPM
id: publish_pre_release_version
run: |
version=$(node -p 'require("./lerna.json").version')
echo "::set-output name=LIB_VERSION::${version}"
echo "Publishing DEV version - v${version}-alpha.${{ github.run_id }}"
make move-package-json-to-dist
make prerelease-version-upgrade-${version}-alpha.${{ github.run_id }}
make pretty
make publish-packages-next
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name : Notify Slack on alpha version deployment
uses : rtCamp/action-slack-notify@v2
env :
SLACK_CHANNEL : frontegg-alpha-versions
SLACK_COLOR : ${{ job.status }}
SLACK_ICON : https://avatars.githubusercontent.com/u/67857107?s=40&v=4
SLACK_MESSAGE : '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }} has been released :rocket:'
SLACK_TITLE : 'A new @frontegg/react alpha version!'
SLACK_USERNAME : ${{ github.actor }}
SLACK_WEBHOOK : ${{ secrets.ROTEM_SLACK_WEBHOOK }}
MSG_MINIMAL : true
62 changes: 43 additions & 19 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,19 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Trigger E2E test workflow
- name: Notify Slack on alpha version deployment
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: frontegg-alpha-versions
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/67857107?s=40&v=4
SLACK_MESSAGE: '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }} has been released :rocket:'
SLACK_TITLE: 'A new @frontegg/react alpha version!'
SLACK_USERNAME: ${{ github.actor }}
SLACK_WEBHOOK: ${{ secrets.ROTEM_SLACK_WEBHOOK }}
MSG_MINIMAL: true

- name: Prepare E2E test workflow
uses: actions/github-script@v5
env:
PR_REF: '${{ steps.cpr.outputs.pull-request-head-sha }}'
Expand All @@ -114,25 +126,37 @@ jobs:
const repo = context.payload.repository.name
const owner = context.payload.repository.organization
const res = await github.rest.repos.createCommitStatus({
context, owner, repo, sha,
state: 'pending',
description: 'Dispatching E2E tests...',
});
- name: "Trigger E2E tests"
uses: actions/github-script@v5
env:
PR_REF: '${{ steps.cpr.outputs.pull-request-head-sha }}'
PR_VERSION: '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}'
with:
github-token: ${{ secrets.E2E_WORKFLOW_TOKEN }}
script: |
const version = process.env.PR_VERSION;
const sha = process.env.PR_REF;
const repo = context.payload.repository.name
const owner = context.payload.repository.organization
const e2eRepo = 'e2e-system-tests'
const workflow_id = 'frontegg-react-e2e-tests.yml'
const context = `${owner}/${e2eRepo}`
const dispatch_id = `${repo}/${sha}`
const data = await github.rest.actions.createWorkflowDispatch({
owner: context.payload.repository.organization,
repo: context.payload.repository.name,
workflow_id: 'trigger-e2e-test.yml',
ref: process.env.PR_REF,
owner,
repo:e2eRepo,
workflow_id,
ref: 'main',
inputs: {
version: process.env.PR_VERSION,
repo,
sha
version,
dispatch_id,
}
});
- name : Notify Slack on alpha version deployment
uses : rtCamp/action-slack-notify@v2
env :
SLACK_CHANNEL : frontegg-alpha-versions
SLACK_COLOR : ${{ job.status }}
SLACK_ICON : https://avatars.githubusercontent.com/u/67857107?s=40&v=4
SLACK_MESSAGE : '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }} has been released :rocket:'
SLACK_TITLE : 'A new @frontegg/react alpha version!'
SLACK_USERNAME : ${{ github.actor }}
SLACK_WEBHOOK : ${{ secrets.ROTEM_SLACK_WEBHOOK }}
MSG_MINIMAL : true
16 changes: 7 additions & 9 deletions .github/workflows/trigger-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ on:
version:
description: 'Version'
required: true
dispatch_id:
description: 'Dispatch Id (repo/sha)'
repo:
description: 'Repository name'
required: true
sha:
description: 'Commit SHA'
required: true

jobs:
Expand All @@ -19,7 +22,8 @@ jobs:
uses: actions/github-script@v5
env:
version: ${{ inputs.version }}
dispatch_id: ${{ inputs.dispatch_id }}
repo: ${{ inputs.repo }}
sha: ${{ inputs.sha }}
with:
github-token: ${{ secrets.E2E_WORKFLOW_TOKEN }}
script: |
Expand All @@ -30,12 +34,6 @@ jobs:
const context = `${owner}/${e2eRepo}`
const dispatch_id = `${repo}/${sha}`
const res = await github.rest.repos.createCommitStatus({
context, owner, repo, sha,
state: 'pending',
description: 'Dispatching E2E tests...',
});
const data = await github.rest.actions.createWorkflowDispatch({
owner,
repo:e2eRepo,
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Change Log

## [6.0.9](https://github.com/frontegg/frontegg-react/compare/v6.0.8...v6.0.9) (2023-11-21)

- FR-14201 - Fixed login with SMS resend code action

- FR-13913 - Let tenants/users set expiry on client credentials API tokens
- FR-14099 - Fix load custom login routes only when necessary
- FR-13605 - Support adding phone number field to signup page and control his required state

- FR-14102 - Fixed entitlements Frontegg user-id attribute usage
- FR-13123 - Added support to provide scopes for social logins


### React Wrapper 6.0.9:
- Tigger E2E workflows on pre-release pipeline
- FR-13417 - Fixed include query param after signup
# Change Log

## [6.0.8](https://github.com/frontegg/frontegg-react/compare/v6.0.7...v6.0.8) (2023-11-6)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "6.0.8",
"version": "6.0.9",
"npmClient": "yarn",
"useWorkspaces": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/demo-saas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@frontegg/demo-saas",
"version": "6.0.8",
"version": "6.0.9",
"private": true,
"author": "Frontegg LTD",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"test": "echo 'No Unit Tests'"
},
"dependencies": {
"@frontegg/react": "^6.0.8",
"@frontegg/react": "^6.0.9",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frontegg/react",
"libName": "FronteggReact",
"version": "6.0.8",
"version": "6.0.9",
"author": "Frontegg LTD",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -10,8 +10,8 @@
"build:watch": "rm -rf dist && mkdir dist && rollup -w -c ./rollup.config.js"
},
"dependencies": {
"@frontegg/js": "6.152.0",
"@frontegg/react-hooks": "6.152.0"
"@frontegg/js": "6.154.0",
"@frontegg/react-hooks": "6.154.0"
},
"peerDependencies": {
"react": ">16.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/sdkVersion.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default { version: '6.0.8' };
export default { version: '6.0.9' };
2 changes: 1 addition & 1 deletion packages/sanity-check/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontegg-react-sanity-check",
"private": true,
"version": "6.0.8",
"version": "6.0.9",
"scripts": {
"build": "docker-compose build test",
"build:dev": "docker-compose build test --no-cache",
Expand Down
50 changes: 25 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2378,54 +2378,54 @@
resolved "https://registry.yarnpkg.com/@frontegg/entitlements-javascript-commons/-/entitlements-javascript-commons-1.0.1.tgz#038a5b86166bd00cfd3afa942de361434c34ea04"
integrity sha512-Ny9M9wLcA6/p9OD09plK3ETy5zyTWpgFoIorAYYYxk4J3S6ardsUOai2MlBmXqbG9J1uxD66rdFF5qr4bwqgyw==

"@frontegg/js@6.152.0":
version "6.152.0"
resolved "https://registry.yarnpkg.com/@frontegg/js/-/js-6.152.0.tgz#fb06c7f27c4da847c8fa787563fc889da006a37a"
integrity sha512-Vb9LNHmnPzFx457fZSexuyzJZwO9hCHq/CTe28ZSAWoptggkOtYBsVkV98UuLxdDu9wDwgiv5JCsRXokwY3J0A==
"@frontegg/js@6.154.0":
version "6.154.0"
resolved "https://registry.yarnpkg.com/@frontegg/js/-/js-6.154.0.tgz#4978814871f8138d9bfb93f061d220dbb5ded0a5"
integrity sha512-qUnDwIX/+yNalssgKn+Da3qG5l+iwJ6bHeY5O7xF5DFe7iiTRUeSUenV7fROmR2dS3BtBOhEPwa3kVo1WEyzRw==
dependencies:
"@babel/runtime" "^7.18.6"
"@frontegg/types" "6.152.0"
"@frontegg/types" "6.154.0"

"@frontegg/react-hooks@6.152.0":
version "6.152.0"
resolved "https://registry.yarnpkg.com/@frontegg/react-hooks/-/react-hooks-6.152.0.tgz#74a12855d6a4866210d550298e64888e871e0ffd"
integrity sha512-Lj2o6+hFh/FHW19LUbPROrpEv7vk1xqy708k+ddPAKdOYsICQx9IBzh0+YgrrRmrRV09xd94rr9svxglYczKXQ==
"@frontegg/react-hooks@6.154.0":
version "6.154.0"
resolved "https://registry.yarnpkg.com/@frontegg/react-hooks/-/react-hooks-6.154.0.tgz#dfd0c9d651cf456b4360748994845e733cd65f19"
integrity sha512-NLdj8IkZ6fi8vuqlyoesh4bYlaUlan3hAvCaDSC09eB7HjlSqBHHU67hCovUAvebL+UDye0+P79ptIV99J9Yow==
dependencies:
"@babel/runtime" "^7.18.6"
"@frontegg/redux-store" "6.152.0"
"@frontegg/types" "6.152.0"
"@frontegg/redux-store" "6.154.0"
"@frontegg/types" "6.154.0"
"@types/react" "*"
get-value "^3.0.1"
react-redux "^7.x"

"@frontegg/redux-store@6.152.0":
version "6.152.0"
resolved "https://registry.yarnpkg.com/@frontegg/redux-store/-/redux-store-6.152.0.tgz#848daae76432c43885e09aabea775ef7363a9eb9"
integrity sha512-mI8mPgEwMgJy2a315vfJxEefkcGHewXISW6U3wvc6tBZdPs700eiI86r4+bV/QyZEJS96RKwqw+9IV2WE0Arqw==
"@frontegg/redux-store@6.154.0":
version "6.154.0"
resolved "https://registry.yarnpkg.com/@frontegg/redux-store/-/redux-store-6.154.0.tgz#dd17d22c6f3bbf78733d87080b711eaaa16f1977"
integrity sha512-qFVtZfxehl5TzNrsCcdYvL3xiuPuMC+C64H7fIdBBJO7d75G4wp4zZvteBIUJu7IQWLSwmBRbDyjJ++l3ojbGA==
dependencies:
"@babel/runtime" "^7.18.6"
"@frontegg/entitlements-javascript-commons" "1.0.1"
"@frontegg/rest-api" "3.1.47"
"@frontegg/rest-api" "3.1.48"
"@reduxjs/toolkit" "1.8.5"
fast-deep-equal "3.1.3"
redux-saga "^1.2.1"
uuid "^8.3.2"

"@frontegg/[email protected].47":
version "3.1.47"
resolved "https://registry.yarnpkg.com/@frontegg/rest-api/-/rest-api-3.1.47.tgz#fbd03c2007baf090b88cb02bed0ff72f8a9929c6"
integrity sha512-tv1cTaTqbOnHjoEyki0jnNitglWdDiaML4rgH1GQND1k58AY1U9DORQYQUeU53+/F1XO34m9e0pHfvLjzt3SsQ==
"@frontegg/[email protected].48":
version "3.1.48"
resolved "https://registry.yarnpkg.com/@frontegg/rest-api/-/rest-api-3.1.48.tgz#78947faa40dca6a7aac27928e7ef3a62a8f29159"
integrity sha512-/fcBufYuGL1zOeC9q2dGvXaNPxwff4Ppol7aHZDR3cYSTli6iaOAk+h1qNBTYWR3s20oRGMRR4UR8epROGyU/g==
dependencies:
"@babel/runtime" "^7.17.2"
"@frontegg/entitlements-javascript-commons" "1.0.1"

"@frontegg/types@6.152.0":
version "6.152.0"
resolved "https://registry.yarnpkg.com/@frontegg/types/-/types-6.152.0.tgz#d1aef7ef77ef33ec199d0c8127a8124581681de6"
integrity sha512-xbgjohGjr0VMaT0fYyt7D/F1N9NA8a7zFwBGPJbMKf6waS/pQNSeaU9h1ohKwvzMXVUqBPesnuzf+yCDD96g+w==
"@frontegg/types@6.154.0":
version "6.154.0"
resolved "https://registry.yarnpkg.com/@frontegg/types/-/types-6.154.0.tgz#69889a510aa55c92f529003605eb655aa53bd896"
integrity sha512-X2AFVcE+W8BpvMe/utLhfOHNZxoH6myifih9QYmbAsy37DbnoLd8hv+tHNrmzj2iBe17JgKpGr3BiVvoh1l3hQ==
dependencies:
"@babel/runtime" "^7.18.6"
"@frontegg/redux-store" "6.152.0"
"@frontegg/redux-store" "6.154.0"
csstype "^3.0.9"
deepmerge "^4.2.2"

Expand Down

0 comments on commit 48b9f93

Please sign in to comment.