Skip to content

Fix: Extension breakage due to global variable conflict#1132

Merged
mohdsayed merged 2 commits into
release/v1.1.1from
fix/global-variable-conflict
Jul 30, 2025
Merged

Fix: Extension breakage due to global variable conflict#1132
mohdsayed merged 2 commits into
release/v1.1.1from
fix/global-variable-conflict

Conversation

@amovar18

Copy link
Copy Markdown
Collaborator

Description

This PR addresses a critical issue where certain pages fail to load due to global variable collisions, specifically with the ne identifier. The problem was traced to a conflict between pages and extensions, which was exacerbated by recent changes in Vite configuration. This collision was causing an error related to the re-declaration of the ne identifier.

Relevant Technical Choices

  • The issue was identified as a global variable collision caused by the new build setup injecting some globals.
  • The fix involves adding target: 'esnext' to the configuration to prevent the unintended injection of global variables. This ensures that the build output is compatible with the latest JavaScript features and avoids conflicts.

Testing Instructions

  1. Navigate to a page that was previously failing to load when PSAT was on.
  2. Ensure PSAT is active.
  3. Verify that the page loads without any errors related to the ne identifier or global variable collisions.
  4. Test with Google Docs to confirm that the conflicts related to the Prebid implementation are resolved.
  5. Check for any other side effects on various pages to ensure the fix hasn't introduced new issues.

Additional Information:

This fix is a one-line change that targets the core of the problem by adjusting the build configuration. It's a targeted and efficient solution to a critical bug.

Screenshot/Screencast

(Please provide a screenshot or screencast of the page loading successfully after the fix is implemented.)


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

@amovar18 amovar18 self-assigned this Jul 30, 2025
@amovar18 amovar18 requested a review from mohdsayed July 30, 2025 07:00
@amovar18 amovar18 marked this pull request as ready for review July 30, 2025 07:00
@mohdsayed mohdsayed changed the base branch from main to release/v1.1.1 July 30, 2025 13:11
@mohdsayed mohdsayed merged commit 98b3925 into release/v1.1.1 Jul 30, 2025
1 check passed
@mohdsayed mohdsayed deleted the fix/global-variable-conflict branch July 30, 2025 13:12
@mohdsayed mohdsayed mentioned this pull request Jul 30, 2025
mohdsayed added a commit that referenced this pull request Aug 27, 2025
* Fix: Extension breakage due to global variable conflict (#1132)

* Refactor minification logic in script configuration

* Simplify minification logic in createScriptConfig function

* Update cookie database, rws and changelog

* Bump version

* Fix vulnerabilities

* Remove soft hypen

---------

Co-authored-by: Kudaligi Amoghavarsha <kgamoghavarsha@gmail.com>
mohdsayed added a commit that referenced this pull request Aug 28, 2025
* Fix: Extension breakage due to global variable conflict (#1132)

* Refactor minification logic in script configuration

* Simplify minification logic in createScriptConfig function

* Update cookie database, rws and changelog

* Bump version

* Fix vulnerabilities

* Remove soft hypen

* Chore(deps): Bump mermaid from 11.6.0 to 11.10.0 (#1136)

* Chore(deps): Bump mermaid from 11.6.0 to 11.10.0

Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 11.6.0 to 11.10.0.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](https://github.com/mermaid-js/mermaid/compare/mermaid@11.6.0...mermaid@11.10.0)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-version: 11.10.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade p5

* Ignore ts issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sayedtaqui <sayedwp@gmail.com>

* Chore(deps-dev): Bump vite-plugin-static-copy from 3.0.2 to 3.1.2 (#1137)

Bumps [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy) from 3.0.2 to 3.1.2.
- [Release notes](https://github.com/sapphi-red/vite-plugin-static-copy/releases)
- [Changelog](https://github.com/sapphi-red/vite-plugin-static-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sapphi-red/vite-plugin-static-copy/compare/vite-plugin-static-copy@3.0.2...vite-plugin-static-copy@3.1.2)

---
updated-dependencies:
- dependency-name: vite-plugin-static-copy
  dependency-version: 3.1.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sayedtaqui <sayedwp@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kudaligi Amoghavarsha <kgamoghavarsha@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants