Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 24490a2
☁️ Nx Cloud last updated this comment at |
🦋 Changeset detectedLatest commit: 24490a2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (15.07%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
===========================================
- Coverage 70.90% 15.07% -55.83%
===========================================
Files 53 153 +100
Lines 2021 26357 +24336
Branches 377 1088 +711
===========================================
+ Hits 1433 3974 +2541
- Misses 588 22383 +21795
🚀 New features to boost your workflow:
|
@forgerock/davinci-client
@forgerock/device-client
@forgerock/journey-client
@forgerock/oidc-client
@forgerock/protect
@forgerock/sdk-types
@forgerock/sdk-utilities
@forgerock/iframe-manager
@forgerock/sdk-logger
@forgerock/sdk-oidc
@forgerock/sdk-request-middleware
@forgerock/storage
commit: |
|
Deployed 3d1fe8d to https://ForgeRock.github.io/ping-javascript-sdk/pr-568/3d1fe8de4e035f80612c5cb5c081f1a75d02c92c branch gh-pages in ForgeRock/ping-javascript-sdk |
📦 Bundle Size Analysis📦 Bundle Size Analysis🚨 Significant Changes🔻 @forgerock/device-client - 0.0 KB (-9.7 KB, -100.0%) 📊 Minor Changes📉 @forgerock/device-client - 9.7 KB (-0.0 KB) ➖ No Changes➖ @forgerock/oidc-client - 24.9 KB 14 packages analyzed • Baseline from latest Legend🆕 New package ℹ️ How bundle sizes are calculated
🔄 Updated automatically on each push to this PR |
3e5d66d to
d6223eb
Compare
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We fix three lint errors introduced by the richContent feature: a Prettier formatting violation on long expectTypeOf chains in the type-test file, an inline object that exceeded Prettier's print width in the unit test, and an unused CollectorRichContent import in collector.utils.ts. These changes bring the code into compliance with the workspace's ESLint and Prettier rules without altering any runtime or type-level behaviour.
Tip
✅ We verified this fix by re-running @forgerock/davinci-client:lint.
Suggested Fix changes
diff --git a/packages/davinci-client/src/lib/collector.richcontent.test-d.ts b/packages/davinci-client/src/lib/collector.richcontent.test-d.ts
index f671329c3..6142ef232 100644
--- a/packages/davinci-client/src/lib/collector.richcontent.test-d.ts
+++ b/packages/davinci-client/src/lib/collector.richcontent.test-d.ts
@@ -72,12 +72,18 @@ describe('Rich Content Types', () => {
});
it('should have required richContent with CollectorRichContent shape', () => {
- expectTypeOf<ReadOnlyCollectorBase['output']['richContent']>().toEqualTypeOf<CollectorRichContent>();
+ expectTypeOf<
+ ReadOnlyCollectorBase['output']['richContent']
+ >().toEqualTypeOf<CollectorRichContent>();
});
it('should have standard collector fields', () => {
- expectTypeOf<ReadOnlyCollectorBase>().toHaveProperty('category').toEqualTypeOf<'NoValueCollector'>();
- expectTypeOf<ReadOnlyCollectorBase>().toHaveProperty('type').toEqualTypeOf<'ReadOnlyCollector'>();
+ expectTypeOf<ReadOnlyCollectorBase>()
+ .toHaveProperty('category')
+ .toEqualTypeOf<'NoValueCollector'>();
+ expectTypeOf<ReadOnlyCollectorBase>()
+ .toHaveProperty('type')
+ .toEqualTypeOf<'ReadOnlyCollector'>();
expectTypeOf<ReadOnlyCollectorBase>().toHaveProperty('error').toEqualTypeOf<string | null>();
});
});
diff --git a/packages/davinci-client/src/lib/collector.utils.test.ts b/packages/davinci-client/src/lib/collector.utils.test.ts
index 67316ca25..9ff5804b6 100644
--- a/packages/davinci-client/src/lib/collector.utils.test.ts
+++ b/packages/davinci-client/src/lib/collector.utils.test.ts
@@ -1273,7 +1273,13 @@ describe('validateReplacements', () => {
expect(result).toEqual({
ok: true,
replacements: [
- { key: 'link1', type: 'link', value: 'terms', href: 'https://example.com', target: '_blank' },
+ {
+ key: 'link1',
+ type: 'link',
+ value: 'terms',
+ href: 'https://example.com',
+ target: '_blank',
+ },
{ key: 'link2', type: 'link', value: 'policy', href: 'https://xyz.com', target: '_self' },
],
});
@@ -1292,9 +1298,7 @@ describe('validateReplacements', () => {
expect(result).toEqual({
ok: true,
- replacements: [
- { key: 'link', type: 'link', value: 'here', href: 'https://example.com' },
- ],
+ replacements: [{ key: 'link', type: 'link', value: 'here', href: 'https://example.com' }],
});
});
diff --git a/packages/davinci-client/src/lib/collector.utils.ts b/packages/davinci-client/src/lib/collector.utils.ts
index 757f88b92..17994836e 100644
--- a/packages/davinci-client/src/lib/collector.utils.ts
+++ b/packages/davinci-client/src/lib/collector.utils.ts
@@ -32,7 +32,6 @@ import type {
QrCodeCollectorBase,
ValidatedReplacement,
ValidateReplacementsResult,
- CollectorRichContent,
ReadOnlyCollectorBase,
} from './collector.types.js';
import type {
Or Apply changes locally with:
npx nx-cloud apply-locally 5kUe-VYSS
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
Support RichContent link types by creating a NoValueCollector for it
d6223eb to
24490a2
Compare
JIRA Ticket
https://pingidentity.atlassian.net/browse/SDKS-4248
Description
richContentstructure (template + validated replacements array) onReadOnlyCollectorChanges
RichContentReplacement,RichContent(with optionalreplacements)RichContentLink,ValidatedReplacement(extensible union),CollectorRichContent,ReadOnlyCollectorBasevalidateReplacements()— validates hrefs, convertsRecordto array withkeyfieldreturnReadOnlyCollector()—output.contentis plain text string,output.richContentis always present with template and validated replacements arrayjavascript:,data:, and other unsafe URI schemes (allowlist:http:,https:only)Collector Output Shape