Skip to content

Commit 60e6ffb

Browse files
authored
Merge pull request #576 from ForgeRock/changeset-release/master
Release PR
2 parents 39c74ed + c80e01a commit 60e6ffb

28 files changed

Lines changed: 17144 additions & 20013 deletions

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"baseBranch": "master",
1414
"updateInternalDependencies": "patch",
1515
"ignore": [
16-
"@forgerock/token-vault",
1716
"autoscript-apps",
1817
"autoscript-suites",
1918
"mock-api",

.github/workflows/ci-fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- run: git branch --track main origin/main || true
5555

5656
- run: pnpm nx format:check
57-
- run: pnpm nx affected -t build typecheck lint test e2e-ci
57+
- run: pnpm nx affected -t build typecheck lint test e2e

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- run: pnpm exec nx-cloud record -- nx format:check --verbose
3737
- run: pnpm exec nx affected -t build lint test docs e2e-ci
3838

39+
- name: Publish previews to Stackblitz on PR
40+
run: pnpm pkg-pr-new publish './packages/*' --packageManager=pnpm --pnpm
41+
3942
- uses: codecov/codecov-action@v5
4043
with:
4144
files: ./packages/**/coverage/*.xml

.github/workflows/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
jobs:
1010
label-pr:
1111
runs-on: ubuntu-latest
12+
if: ${{github.event.pull_request.head.repo.full_name == github.repository}}
1213
steps:
1314
- uses: actions/checkout@v3
1415
with:

.github/workflows/publish.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,29 @@ jobs:
102102
- name: Format published packages for Slack
103103
if: steps.changesets.outputs.published == 'true'
104104
id: format-packages
105+
env:
106+
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
105107
run: |
106-
PACKAGES=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[] | ":package: *\(.name)* `\(.version)`"')
107-
echo "formatted<<EOF" >> $GITHUB_OUTPUT
108-
echo "$PACKAGES" >> $GITHUB_OUTPUT
108+
FORMATTED=$(echo "$PUBLISHED_PACKAGES" | jq -r '.[] | ":package: *\(.name)* `\(.version)`"')
109+
PAYLOAD=$(jq -n --arg packages "$FORMATTED" '{"publishedPackages": $packages}')
110+
echo "payload<<EOF" >> $GITHUB_OUTPUT
111+
echo "$PAYLOAD" >> $GITHUB_OUTPUT
109112
echo "EOF" >> $GITHUB_OUTPUT
110113
111114
- name: Send GitHub Action data to a Slack workflow
112115
if: steps.changesets.outputs.published == 'true'
116+
id: slack-notify
117+
continue-on-error: true
113118
uses: slackapi/slack-github-action@v2.1.1
114119
with:
115-
payload-delimiter: '_'
116120
webhook: ${{ env.SLACK_WEBHOOK_URL }}
117121
webhook-type: webhook-trigger
118-
payload: |
119-
publishedPackages: ${{ steps.format-packages.outputs.formatted }}
122+
payload: ${{ steps.format-packages.outputs.payload }}
123+
124+
- name: Warn if Slack notification failed
125+
if: steps.slack-notify.outcome == 'failure'
126+
run: |
127+
echo "::warning::Slack notification failed. Check the webhook URL and payload format."
120128
121129
- name: Run code coverage
122130
uses: codecov/codecov-action@v5
@@ -157,13 +165,30 @@ jobs:
157165
id: npmpublish
158166
run: pnpm publish -r --tag ${{ inputs.npm_tag }} --no-git-checks --access ${{ inputs.npm_access }}
159167

168+
- name: Format published packages for Slack
169+
if: steps.npmpublish.outcome == 'success'
170+
id: format-packages
171+
env:
172+
NPM_TAG: ${{ inputs.npm_tag }}
173+
SNAPSHOT_TAG: ${{ inputs.snapshot_tag }}
174+
run: |
175+
FORMATTED=$(jq -rs --arg tag "$SNAPSHOT_TAG" '[.[] | select(.version | contains($tag))] | .[] | ":package: *\(.name)* `\(.version)`"' packages/*/package.json)
176+
PAYLOAD=$(jq -n --arg packages "$FORMATTED" --arg npmTag "$NPM_TAG" '{"npmTag": $npmTag, "publishedPackages": $packages}')
177+
echo "payload<<EOF" >> $GITHUB_OUTPUT
178+
echo "$PAYLOAD" >> $GITHUB_OUTPUT
179+
echo "EOF" >> $GITHUB_OUTPUT
180+
160181
- name: Send GitHub Action data to a Slack workflow
161182
if: steps.npmpublish.outcome == 'success'
183+
id: slack-notify-beta
184+
continue-on-error: true
162185
uses: slackapi/slack-github-action@v2.1.1
163186
with:
164-
payload-delimiter: '_'
165187
webhook: ${{ env.SLACK_WEBHOOK_URL_BETA }}
166188
webhook-type: webhook-trigger
167-
payload: |
168-
npmTag: "${{ inputs.npm_tag }}"
169-
publishedPackages: ""
189+
payload: ${{ steps.format-packages.outputs.payload }}
190+
191+
- name: Warn if Slack notification failed
192+
if: steps.slack-notify-beta.outcome == 'failure'
193+
run: |
194+
echo "::warning::Slack beta notification failed. Check the webhook URL and payload format."

e2e/autoscript-suites/src/suites/authn-central-logout.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('should login and logout with pingone', async ({ page }) => {
2020
await btn.click({ delay: 1000 });
2121
await page.waitForURL(/ping/);
2222
await page.getByPlaceholder('Username').fill('reactdavinci@user.com');
23-
await page.getByRole('textbox', { name: 'Password' }).fill('bae0fzc-mzg3krg5FQB');
23+
await page.getByRole('textbox', { name: 'Password' }).fill('twf0MCH5xnw.jcj4qtq');
2424
await page.getByRole('button', { name: 'Sign On' }).click();
2525

2626
await expect(page.getByText('preferred_username')).toContainText('reactdavinci@user.com');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"mkcert": "^3.2.0",
9696
"npm-cli-login": "^1.0.0",
9797
"nx": "20.3.3",
98-
"pkg-pr-new": "^0.0.60",
98+
"pkg-pr-new": "^0.0.63",
9999
"playwright": "1.47.2",
100100
"prettier": "^3.2.5",
101101
"pretty-quick": "^4.0.0",

packages/javascript-sdk/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 4.9.0
4+
5+
### Minor Changes
6+
7+
- [#571](https://github.com/ForgeRock/forgerock-javascript-sdk/pull/571) [`03135cf`](https://github.com/ForgeRock/forgerock-javascript-sdk/commit/03135cf543e3f694d48e6b9e0b9116ccf42737d1) Thanks [@cameronwhitworthforgerock](https://github.com/cameronwhitworthforgerock)! - Added support for Conditional UI elements with WebAuthN
8+
9+
- [#581](https://github.com/ForgeRock/forgerock-javascript-sdk/pull/581) [`1253482`](https://github.com/ForgeRock/forgerock-javascript-sdk/commit/1253482a3c517ba470f4dd8c6e43b89d380d6944) Thanks [@SteinGabriel](https://github.com/SteinGabriel)! - fix(protect): update Protect callback with new Signals SDK config
10+
11+
### Patch Changes
12+
13+
- [#577](https://github.com/ForgeRock/forgerock-javascript-sdk/pull/577) [`1fb1e57`](https://github.com/ForgeRock/forgerock-javascript-sdk/commit/1fb1e574a6583b00cecb909534e005da3b7d247e) Thanks [@thomas-schofield-fr](https://github.com/thomas-schofield-fr)! - WebAuthn improvements
14+
15+
- Fix parsing of WebAuthn scripts when `asScript` is true
16+
- Improve handling when conditional mediation is not supported
17+
- Enable re-invocation of WebAuthn requests
18+
- Enable modification of options passed to navigator.credentials.get()
19+
320
## 4.8.3
421

522
### Patch Changes

packages/javascript-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@forgerock/javascript-sdk",
3-
"version": "4.8.3",
3+
"version": "4.9.0",
44
"description": "ForgeRock JavaScript SDK",
55
"author": "ForgeRock",
66
"license": "MIT",

packages/javascript-sdk/src/fr-auth/callbacks/ping-protect-initialize-callback.test.ts

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* ping-protect-intitialize-callback.test.ts
55
*
6-
* Copyright (c) 2024 - 2025 Ping Identity Corporation. All rights reserved.
6+
* Copyright (c) 2024 - 2026 Ping Identity Corporation. All rights reserved.
77
* This software may be modified and distributed under the terms
88
* of the MIT license. See the LICENSE file for details.
99
*/
@@ -186,6 +186,80 @@ describe('PingOneProtectInitializeCallback', () => {
186186
});
187187
});
188188

189+
it('should return signalsInitializationOptions directly when valid', () => {
190+
const signalsInitializationOptions = {
191+
agentIdentification: 'false',
192+
htmlGeoLocation: 'true',
193+
behavioralDataCollection: 'true',
194+
universalDeviceIdentification: 'false',
195+
option1: 'value1',
196+
disableTags: 'false',
197+
};
198+
199+
const callback = new PingOneProtectInitializeCallback({
200+
type: 'PingOneProtectInitializeCallback' as CallbackType,
201+
input: [],
202+
output: [
203+
{
204+
name: 'signalsInitializationOptions',
205+
value: signalsInitializationOptions,
206+
},
207+
{
208+
name: 'envId',
209+
value: 'legacy-env-id-that-should-be-ignored',
210+
},
211+
],
212+
});
213+
214+
const config = callback.getConfig();
215+
expect(config).toEqual(signalsInitializationOptions);
216+
expect(config).not.toHaveProperty('envId');
217+
});
218+
219+
it('should fallback to legacy config when signalsInitializationOptions is invalid', () => {
220+
const callback = new PingOneProtectInitializeCallback({
221+
type: 'PingOneProtectInitializeCallback' as CallbackType,
222+
input: [],
223+
output: [
224+
{
225+
name: 'signalsInitializationOptions',
226+
value: [],
227+
},
228+
{
229+
name: 'envId',
230+
value: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
231+
},
232+
],
233+
});
234+
235+
const config = callback.getConfig();
236+
expect(config).toMatchObject({
237+
envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
238+
behavioralDataCollection: true,
239+
disableTags: false,
240+
});
241+
});
242+
243+
it('should fallback to legacy config when signalsInitializationOptions is missing', () => {
244+
const callback = new PingOneProtectInitializeCallback({
245+
type: 'PingOneProtectInitializeCallback' as CallbackType,
246+
input: [],
247+
output: [
248+
{
249+
name: 'envId',
250+
value: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
251+
},
252+
],
253+
});
254+
255+
const config = callback.getConfig();
256+
expect(config).toMatchObject({
257+
envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
258+
behavioralDataCollection: true,
259+
disableTags: false,
260+
});
261+
});
262+
189263
it('should test the setClientError method', () => {
190264
const callback = new PingOneProtectInitializeCallback({
191265
type: 'PingOneProtectInitializeCallback' as CallbackType,

0 commit comments

Comments
 (0)