From 66fbe1bde789da1a9dee4c84de1c03e6349f0737 Mon Sep 17 00:00:00 2001 From: Pranav Date: Fri, 7 Mar 2025 16:02:40 -0800 Subject: [PATCH 1/7] fix: Hide Configuration page for Microsoft & Gmail channels (#11045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Microsoft and Gmail channels don’t function with custom SMTP or IMAP configurations or forwarding option. Displaying the configuration tab creates confusion among users. This PR would eliminate the option for these channels. --- .../dashboard/routes/dashboard/settings/inbox/Settings.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue index 785c12d3a..fa7c9baec 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue @@ -121,8 +121,6 @@ export default { this.isALineChannel || this.isAPIInbox || (this.isAnEmailChannel && !this.inbox.provider) || - this.isAMicrosoftInbox || - this.isAGoogleInbox || this.isAWhatsAppChannel || this.isAWebWidgetInbox ) { From 50c6e50a620576023355c230c0a6f77f60516bd5 Mon Sep 17 00:00:00 2001 From: Pranav Date: Mon, 10 Mar 2025 18:13:00 -0700 Subject: [PATCH 2/7] fix: Add inbound_emails feature to the list of enabled features in paid account (#11055) Enable inbound_emails in paid accounts automatically --- .../services/enterprise/billing/handle_stripe_event_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/app/services/enterprise/billing/handle_stripe_event_service.rb b/enterprise/app/services/enterprise/billing/handle_stripe_event_service.rb index 6ed05653c..220147a89 100644 --- a/enterprise/app/services/enterprise/billing/handle_stripe_event_service.rb +++ b/enterprise/app/services/enterprise/billing/handle_stripe_event_service.rb @@ -66,7 +66,7 @@ class Enterprise::Billing::HandleStripeEventService end def features_to_update - %w[help_center campaigns team_management channel_twitter channel_facebook channel_email captain_integration] + %w[inbound_emails help_center campaigns team_management channel_twitter channel_facebook channel_email captain_integration] end def subscription From d96ac59cca4a0d7901c3ce1ef4e007cb07fb63f2 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Wed, 12 Mar 2025 03:19:27 +0530 Subject: [PATCH 3/7] fix: Translate "None" option in agent assignment dropdown (#11060) # Pull Request Template ## Description This PR includes a translation update for the "None" option in the agent assignment multi-select dropdown. Fixes https://linear.app/chatwoot/issue/CW-4140/none-option-in-assign-agent-multi-select-is-not-translated ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? **Test cases** 1. Check in conversation sidebar 2. Check in command bar 3. Check in participation dropdown ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- .../composables/spec/useAgentsList.spec.js | 47 ++++++++++++------- .../dashboard/composables/useAgentsList.js | 25 +++++++--- .../dashboard/helper/agentHelper.js | 32 ------------- .../helper/specs/agentHelper.spec.js | 37 --------------- .../dashboard/i18n/locale/en/agentMgmt.json | 3 ++ 5 files changed, 51 insertions(+), 93 deletions(-) diff --git a/app/javascript/dashboard/composables/spec/useAgentsList.spec.js b/app/javascript/dashboard/composables/spec/useAgentsList.spec.js index 2f7f74e98..7f6d8e757 100644 --- a/app/javascript/dashboard/composables/spec/useAgentsList.spec.js +++ b/app/javascript/dashboard/composables/spec/useAgentsList.spec.js @@ -5,9 +5,26 @@ import { useMapGetter } from 'dashboard/composables/store'; import { allAgentsData, formattedAgentsData } from './fixtures/agentFixtures'; import * as agentHelper from 'dashboard/helper/agentHelper'; +// Mock vue-i18n +vi.mock('vue-i18n', () => ({ + useI18n: () => ({ + t: key => (key === 'AGENT_MGMT.MULTI_SELECTOR.LIST.NONE' ? 'None' : key), + }), +})); + vi.mock('dashboard/composables/store'); vi.mock('dashboard/helper/agentHelper'); +// Create a mock None agent +const mockNoneAgent = { + confirmed: true, + name: 'None', + id: 0, + role: 'agent', + account_id: 0, + email: 'None', +}; + const mockUseMapGetter = (overrides = {}) => { const defaultGetters = { getCurrentUser: ref(allAgentsData[0]), @@ -28,14 +45,6 @@ describe('useAgentsList', () => { agentHelper.getSortedAgentsByAvailability.mockReturnValue( formattedAgentsData.slice(1) ); - agentHelper.getCombinedAgents.mockImplementation( - (agents, includeNone, isAgentSelected) => { - if (includeNone && isAgentSelected) { - return [agentHelper.createNoneAgent, ...agents]; - } - return agents; - } - ); mockUseMapGetter(); }); @@ -44,24 +53,26 @@ describe('useAgentsList', () => { const { agentsList, assignableAgents } = useAgentsList(); expect(assignableAgents.value).toEqual(allAgentsData); - expect(agentsList.value).toEqual([ - agentHelper.createNoneAgent, - ...formattedAgentsData.slice(1), - ]); + expect(agentsList.value[0]).toEqual(mockNoneAgent); + expect(agentsList.value.length).toBe( + formattedAgentsData.slice(1).length + 1 + ); }); it('includes None agent when includeNoneAgent is true', () => { const { agentsList } = useAgentsList(true); - expect(agentsList.value[0]).toEqual(agentHelper.createNoneAgent); - expect(agentsList.value.length).toBe(formattedAgentsData.length); + expect(agentsList.value[0]).toEqual(mockNoneAgent); + expect(agentsList.value.length).toBe( + formattedAgentsData.slice(1).length + 1 + ); }); it('excludes None agent when includeNoneAgent is false', () => { const { agentsList } = useAgentsList(false); - expect(agentsList.value[0]).not.toEqual(agentHelper.createNoneAgent); - expect(agentsList.value.length).toBe(formattedAgentsData.length - 1); + expect(agentsList.value[0].id).not.toBe(0); + expect(agentsList.value.length).toBe(formattedAgentsData.slice(1).length); }); it('handles empty assignable agents', () => { @@ -73,7 +84,7 @@ describe('useAgentsList', () => { const { agentsList, assignableAgents } = useAgentsList(); expect(assignableAgents.value).toEqual([]); - expect(agentsList.value).toEqual([agentHelper.createNoneAgent]); + expect(agentsList.value).toEqual([mockNoneAgent]); }); it('handles missing inbox_id', () => { @@ -86,6 +97,6 @@ describe('useAgentsList', () => { const { agentsList, assignableAgents } = useAgentsList(); expect(assignableAgents.value).toEqual([]); - expect(agentsList.value).toEqual([agentHelper.createNoneAgent]); + expect(agentsList.value).toEqual([mockNoneAgent]); }); }); diff --git a/app/javascript/dashboard/composables/useAgentsList.js b/app/javascript/dashboard/composables/useAgentsList.js index b22493bd1..47e843be6 100644 --- a/app/javascript/dashboard/composables/useAgentsList.js +++ b/app/javascript/dashboard/composables/useAgentsList.js @@ -1,9 +1,9 @@ import { computed } from 'vue'; import { useMapGetter } from 'dashboard/composables/store'; +import { useI18n } from 'vue-i18n'; import { getAgentsByUpdatedPresence, getSortedAgentsByAvailability, - getCombinedAgents, } from 'dashboard/helper/agentHelper'; /** @@ -13,6 +13,7 @@ import { * @returns {Object} An object containing the agents list and assignable agents. */ export function useAgentsList(includeNoneAgent = true) { + const { t } = useI18n(); const currentUser = useMapGetter('getCurrentUser'); const currentChat = useMapGetter('getSelectedChat'); const currentAccountId = useMapGetter('getCurrentAccountId'); @@ -21,6 +22,19 @@ export function useAgentsList(includeNoneAgent = true) { const inboxId = computed(() => currentChat.value?.inbox_id); const isAgentSelected = computed(() => currentChat.value?.meta?.assignee); + /** + * Creates a 'None' agent object + * @returns {Object} None agent object + */ + const createNoneAgent = () => ({ + confirmed: true, + name: t('AGENT_MGMT.MULTI_SELECTOR.LIST.NONE') || 'None', + id: 0, + role: 'agent', + account_id: 0, + email: 'None', + }); + /** * @type {import('vue').ComputedRef} */ @@ -43,11 +57,10 @@ export function useAgentsList(includeNoneAgent = true) { agentsByUpdatedPresence ); - return getCombinedAgents( - filteredAgentsByAvailability, - includeNoneAgent, - isAgentSelected.value - ); + return [ + ...(includeNoneAgent && isAgentSelected.value ? [createNoneAgent()] : []), + ...filteredAgentsByAvailability, + ]; }); return { diff --git a/app/javascript/dashboard/helper/agentHelper.js b/app/javascript/dashboard/helper/agentHelper.js index c32680561..d521e7241 100644 --- a/app/javascript/dashboard/helper/agentHelper.js +++ b/app/javascript/dashboard/helper/agentHelper.js @@ -1,16 +1,3 @@ -/** - * Default agent object representing 'None' - * @type {Object} - */ -export const createNoneAgent = { - confirmed: true, - name: 'None', - id: 0, - role: 'agent', - account_id: 0, - email: 'None', -}; - /** * Filters and sorts agents by availability status * @param {Array} agents - List of agents @@ -62,22 +49,3 @@ export const getAgentsByUpdatedPresence = ( ); return agentsWithDynamicPresenceUpdate; }; - -/** - * Combines the filtered agents with the 'None' agent option if applicable. - * - * @param {Array} filteredAgentsByAvailability - The list of agents sorted by availability. - * @param {boolean} includeNoneAgent - Whether to include the 'None' agent option. - * @param {boolean} isAgentSelected - Whether an agent is currently selected. - * @returns {Array} The combined list of agents, potentially including the 'None' agent. - */ -export const getCombinedAgents = ( - filteredAgentsByAvailability, - includeNoneAgent, - isAgentSelected -) => { - return [ - ...(includeNoneAgent && isAgentSelected ? [createNoneAgent] : []), - ...filteredAgentsByAvailability, - ]; -}; diff --git a/app/javascript/dashboard/helper/specs/agentHelper.spec.js b/app/javascript/dashboard/helper/specs/agentHelper.spec.js index 5b670a9b3..273834a11 100644 --- a/app/javascript/dashboard/helper/specs/agentHelper.spec.js +++ b/app/javascript/dashboard/helper/specs/agentHelper.spec.js @@ -2,8 +2,6 @@ import { getAgentsByAvailability, getSortedAgentsByAvailability, getAgentsByUpdatedPresence, - getCombinedAgents, - createNoneAgent, } from '../agentHelper'; import { allAgentsData, @@ -93,39 +91,4 @@ describe('agentHelper', () => { ).toEqual([]); }); }); - - describe('getCombinedAgents', () => { - it('includes None agent when includeNoneAgent is true and isAgentSelected is true', () => { - const result = getCombinedAgents(sortedByAvailability, true, true); - expect(result).toEqual([createNoneAgent, ...sortedByAvailability]); - expect(result.length).toBe(sortedByAvailability.length + 1); - expect(result[0]).toEqual(createNoneAgent); - }); - - it('excludes None agent when includeNoneAgent is false', () => { - const result = getCombinedAgents(sortedByAvailability, false, true); - expect(result).toEqual(sortedByAvailability); - expect(result.length).toBe(sortedByAvailability.length); - expect(result[0]).not.toEqual(createNoneAgent); - }); - - it('excludes None agent when isAgentSelected is false', () => { - const result = getCombinedAgents(sortedByAvailability, true, false); - expect(result).toEqual(sortedByAvailability); - expect(result.length).toBe(sortedByAvailability.length); - expect(result[0]).not.toEqual(createNoneAgent); - }); - - it('returns only filtered agents when both includeNoneAgent and isAgentSelected are false', () => { - const result = getCombinedAgents(sortedByAvailability, false, false); - expect(result).toEqual(sortedByAvailability); - expect(result.length).toBe(sortedByAvailability.length); - }); - - it('handles empty filteredAgentsByAvailability array', () => { - const result = getCombinedAgents([], true, true); - expect(result).toEqual([createNoneAgent]); - expect(result.length).toBe(1); - }); - }); }); diff --git a/app/javascript/dashboard/i18n/locale/en/agentMgmt.json b/app/javascript/dashboard/i18n/locale/en/agentMgmt.json index 364fa7d50..448994e69 100644 --- a/app/javascript/dashboard/i18n/locale/en/agentMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/agentMgmt.json @@ -105,6 +105,9 @@ "AGENT": "Select agent", "TEAM": "Select team" }, + "LIST": { + "NONE": "None" + }, "SEARCH": { "NO_RESULTS": { "AGENT": "No agents found", From dedd67167adb5fa2750869453de41dd072519568 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:02:41 -0700 Subject: [PATCH 4/7] chore(deps): Bump rack from 2.2.12 to 2.2.13 (#11056) Bumps [rack](https://github.com/rack/rack) from 2.2.12 to 2.2.13.
Changelog

Sourced from rack's changelog.

[2.2.13] - 2025-03-11

Security

Commits
  • df6c473 Bump patch verison.
  • cceb70c Update changelog.
  • 873d39e Use a fully resolved file path when confirming if a file can be served by `Ra...
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rack&package-manager=bundler&previous-version=2.2.12&new-version=2.2.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/chatwoot/chatwoot/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pranav --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 857319fc4..74a59167a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -561,7 +561,7 @@ GEM activesupport (>= 3.0.0) raabro (1.4.0) racc (1.8.1) - rack (2.2.12) + rack (2.2.13) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-contrib (2.5.0) From 2dd9f0f672ee1dfdb46f21799ad7f9d5e860a28e Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 11 Mar 2025 15:15:28 -0700 Subject: [PATCH 5/7] fix: Force re-render route i18n string (#11063) The string were not taking the correct locale as there were initialized during the component mount. This change would force the component to re-render the strings. --- .../dashboard/components-next/sidebar/Sidebar.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue index 3b68bfd8c..f15137fad 100644 --- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue +++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue @@ -90,7 +90,7 @@ const sortedInboxes = computed(() => inboxes.value.slice().sort((a, b) => a.name.localeCompare(b.name)) ); -const newReportRoutes = [ +const newReportRoutes = () => [ { name: 'Reports Agent', label: t('SIDEBAR.REPORTS_AGENT'), @@ -116,7 +116,7 @@ const newReportRoutes = [ }, ]; -const oldReportRoutes = [ +const oldReportRoutes = () => [ { name: 'Reports Agent', label: t('SIDEBAR.REPORTS_AGENT'), @@ -140,7 +140,7 @@ const oldReportRoutes = [ ]; const reportRoutes = computed(() => - showV4Routes.value ? newReportRoutes : oldReportRoutes + showV4Routes.value ? newReportRoutes() : oldReportRoutes() ); const menuItems = computed(() => { From 86b948ecbdeb6222557f9b9d9fdc42d5429cd3ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:23:55 -0700 Subject: [PATCH 6/7] chore(deps): Bump axios from 1.7.7 to 1.8.2 (#11042) Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.8.2.
Release notes

Sourced from axios's releases.

Release v1.8.2

Release notes:

Bug Fixes

  • http-adapter: add allowAbsoluteUrls to path building (#6810) (fb8eec2)

Contributors to this release

Release v1.8.1

Release notes:

Bug Fixes

  • utils: move generateString to platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)

Contributors to this release

Release v1.8.0

Release notes:

Bug Fixes

  • examples: application crashed when navigating examples in browser (#5938) (1260ded)
  • missing word in SUPPORT_QUESTION.yml (#6757) (1f890b1)
  • utils: replace getRandomValues with crypto module (#6788) (23a25af)

Features

Reverts

BREAKING CHANGES

  • code relying on the above will now combine the URLs instead of prefer request URL

  • feat: add config option for allowing absolute URLs

  • fix: add default value for allowAbsoluteUrls in buildFullPath

  • fix: typo in flow control when setting allowAbsoluteUrls

Contributors to this release

... (truncated)

Changelog

Sourced from axios's changelog.

1.8.2 (2025-03-07)

Bug Fixes

  • http-adapter: add allowAbsoluteUrls to path building (#6810) (fb8eec2)

Contributors to this release

1.8.1 (2025-02-26)

Bug Fixes

  • utils: move generateString to platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)

Contributors to this release

1.8.0 (2025-02-25)

Bug Fixes

  • examples: application crashed when navigating examples in browser (#5938) (1260ded)
  • missing word in SUPPORT_QUESTION.yml (#6757) (1f890b1)
  • utils: replace getRandomValues with crypto module (#6788) (23a25af)

Features

Reverts

BREAKING CHANGES

  • code relying on the above will now combine the URLs instead of prefer request URL

  • feat: add config option for allowing absolute URLs

  • fix: add default value for allowAbsoluteUrls in buildFullPath

... (truncated)

Commits
  • a9f7689 chore(release): v1.8.2 (#6812)
  • fb8eec2 fix(http-adapter): add allowAbsoluteUrls to path building (#6810)
  • 9812045 chore(sponsor): update sponsor block (#6804)
  • 72acf75 chore(sponsor): update sponsor block (#6794)
  • 2e64afd chore(release): v1.8.1 (#6800)
  • 36a5a62 fix(utils): move generateString to platform utils to avoid importing crypto...
  • cceb7b1 chore(release): v1.8.0 (#6795)
  • 23a25af fix(utils): replace getRandomValues with crypto module (#6788)
  • 32c7bcc feat: Add config for ignoring absolute URLs (#5902) (#6192)
  • 4a3e26c chore(config): adjust rollup config to preserve license header to minified Ja...
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.7.7&new-version=1.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/chatwoot/chatwoot/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 131 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 106 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 935667071..a01e45d82 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@vueuse/components": "^12.0.0", "@vueuse/core": "^12.0.0", "activestorage": "^5.2.6", - "axios": "^1.7.7", + "axios": "^1.8.2", "camelcase-keys": "^9.1.3", "chart.js": "~4.4.4", "color2k": "^2.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3df1bb7e6..feda03e04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,8 +92,8 @@ importers: specifier: ^5.2.6 version: 5.2.8 axios: - specifier: ^1.7.7 - version: 1.7.7 + specifier: ^1.8.2 + version: 1.8.2 camelcase-keys: specifier: ^9.1.3 version: 9.1.3 @@ -2114,8 +2114,8 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axios@1.8.2: + resolution: {integrity: sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==} balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -2165,6 +2165,10 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} @@ -2540,6 +2544,10 @@ packages: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -2601,6 +2609,10 @@ packages: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -2609,12 +2621,12 @@ packages: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} es-shim-unscopables@1.0.2: @@ -2879,8 +2891,8 @@ packages: '@nuxt/kit': optional: true - follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -2899,6 +2911,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + engines: {node: '>= 6'} + fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} @@ -2936,6 +2952,14 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -3002,6 +3026,10 @@ packages: gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -3037,6 +3065,10 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} @@ -3565,6 +3597,10 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} @@ -7190,10 +7226,10 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 - axios@1.7.7: + axios@1.8.2: dependencies: - follow-redirects: 1.15.6 - form-data: 4.0.0 + follow-redirects: 1.15.9 + form-data: 4.0.2 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -7251,6 +7287,11 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.2: dependencies: function-bind: 1.1.2 @@ -7626,6 +7667,12 @@ snapshots: dset@3.1.4: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + eastasianwidth@0.2.0: {} editorconfig@1.0.4: @@ -7668,7 +7715,7 @@ snapshots: arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 + es-set-tostringtag: 2.1.0 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 get-intrinsic: 1.2.4 @@ -7716,7 +7763,7 @@ snapshots: es-define-property: 1.0.0 es-errors: 1.3.0 es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 + es-set-tostringtag: 2.1.0 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 get-intrinsic: 1.2.4 @@ -7757,21 +7804,22 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} + es-errors@1.3.0: {} es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 - es-set-tostringtag@2.0.1: + es-object-atoms@1.1.1: dependencies: - get-intrinsic: 1.2.4 - has: 1.0.3 - has-tostringtag: 1.0.2 + es-errors: 1.3.0 - es-set-tostringtag@2.0.3: + es-set-tostringtag@2.1.0: dependencies: - get-intrinsic: 1.2.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -8115,7 +8163,7 @@ snapshots: vue: 3.5.12(typescript@5.6.2) vue-resize: 2.0.0-alpha.1(vue@3.5.12(typescript@5.6.2)) - follow-redirects@1.15.6: {} + follow-redirects@1.15.9: {} for-each@0.3.3: dependencies: @@ -8132,6 +8180,13 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + form-data@4.0.2: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + mime-types: 2.1.35 + fraction.js@4.3.7: {} fs-extra@10.1.0: @@ -8168,6 +8223,24 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-stream@6.0.1: {} get-symbol-description@1.0.0: @@ -8254,6 +8327,8 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + gopd@1.2.0: {} + graceful-fs@4.2.11: {} graphemer@1.4.0: {} @@ -8271,7 +8346,7 @@ snapshots: has-property-descriptors@1.0.0: dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 has-property-descriptors@1.0.2: dependencies: @@ -8283,9 +8358,11 @@ snapshots: has-symbols@1.0.3: {} + has-symbols@1.1.0: {} + has-tostringtag@1.0.2: dependencies: - has-symbols: 1.0.3 + has-symbols: 1.1.0 has@1.0.3: dependencies: @@ -8632,7 +8709,7 @@ snapshots: decimal.js: 10.4.3 domexception: 4.0.0 escodegen: 2.1.0 - form-data: 4.0.0 + form-data: 4.0.2 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -8910,6 +8987,8 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 + math-intrinsics@1.1.0: {} + md5@2.3.0: dependencies: charenc: 0.0.2 @@ -9808,7 +9887,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 object-inspect: 1.13.2 siginfo@2.0.0: {} From 5c05e45206d8715bbafb50a4d3f91492b341c280 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 12 Mar 2025 10:32:25 +0530 Subject: [PATCH 7/7] feat: use nocookie version of youtube & vimeo for help center embeds (#11061) This pull request includes changes to the `CustomMarkdownRenderer` class and its corresponding tests to support YouTube's "nocookie" [[ref](https://support.google.com/youtube/answer/171780?hl=en#zippy=%2Cturn-on-privacy-enhanced-mode)] URLs and adding the `dnt` param to Vimeo embed [[ref](https://help.vimeo.com/hc/en-us/articles/12426260232977-About-Player-parameters)]. ![CleanShot 2025-03-11 at 19 39 36@2x](https://github.com/user-attachments/assets/e7a3e9b1-35a6-4c8c-bdc2-005f773b3d04) --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- lib/custom_markdown_renderer.rb | 4 +-- spec/lib/custom_markdown_renderer_spec.rb | 42 ++++++++--------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/lib/custom_markdown_renderer.rb b/lib/custom_markdown_renderer.rb index dfd3ce700..16bb4e024 100644 --- a/lib/custom_markdown_renderer.rb +++ b/lib/custom_markdown_renderer.rb @@ -79,7 +79,7 @@ class CustomMarkdownRenderer < CommonMarker::HtmlRenderer %(