Skip to content

Conversation

@shs96c
Copy link
Member

@shs96c shs96c commented Dec 16, 2025

User description

We used to have a version of Google Closure Library tucked away in //third_party/closure/goog We never really updated it, because we switched to using rules_closure, and that bundles a different version of Google Closure Library.

This PR vendors the version of Closure back into
third_party/closure/goog and then updates our builds and tests to use.

This is a necessary prelude to updating rules_closure to the latest release. That version no longer bundles a copy of closure, so we need to be using a vendored one. However, the version we end up on won't be this version of closure because the later rules_closure has an updated closure compiler that doesn't like our code.

However, one thing at a time! Let's start by vendoring the thing we're using and remove ourselves from the clutches of a bundled version of the library.


PR Type

Enhancement, Bug fix


Description

  • Vendors Google Closure Library version into third_party/closure/goog to replace the bundled version from rules_closure

  • Updates locale data to CLDR version 35 with new country codes and language translations

  • Refactors ModuleManager to extend AbstractModuleManager base class with improved dependency ordering

  • Modernizes multiple modules to ES6 syntax and safe DOM APIs (goog.module, goog.dom.safe)

  • Fixes type annotations for nullable elements in UI components

  • Improves element visibility detection logic and documentation

  • Updates i18n formatting symbols and date/time patterns to CLDR version 35

  • Removes obsolete code and performance-related test files

  • Necessary prelude to updating rules_closure to the latest release which no longer bundles Closure Library


Diagram Walkthrough

flowchart LR
  A["rules_closure<br/>bundled version"] -- "replace with<br/>vendored version" --> B["third_party/closure/goog"]
  B -- "update to" --> C["CLDR v35"]
  B -- "modernize to" --> D["ES6 + Safe APIs"]
  B -- "fix bugs in" --> E["Type annotations<br/>& visibility"]
Loading

File Walkthrough

Relevant files
Enhancement
7 files
nativenameconstants.js
Update Closure Library locale data to CLDR version 35       

third_party/closure/goog/locale/nativenameconstants.js

  • Updated copyright year from 2008 to 2017
  • Regenerated locale data from CLDR version 35 with updated country and
    language names
  • Converted Unicode escape sequences to native characters for better
    readability
  • Removed obsolete country codes and added new ones (e.g., AC, BL, BQ,
    CP, DG, EA, IC, MF, SX, SS, TA, XK)
  • Updated country name translations across multiple languages with
    current CLDR data
+824/-817
compactnumberformatsymbols.js
Update Closure Library i18n data to CLDR version 35           

third_party/closure/goog/i18n/compactnumberformatsymbols.js

  • Updated CLDR version from 31.0.1 to 35, reflecting newer
    internationalization data
  • Added new locale ar_EG (Egyptian Arabic) support with corresponding
    formatting symbols
  • Updated number formatting patterns across multiple locales (Afrikaans,
    Arabic, Azerbaijani, Bengali, Breton, Catalan, Danish, Spanish, French
    Canadian, Galician, Hindi, Italian, Khmer, Kyrgyz, Macedonian,
    Mongolian, Norwegian, Odia, Albanian, Swahili) with corrected or
    localized abbreviations
  • Refactored locale selection logic from multiple if statements to a
    single switch statement for better performance and maintainability
+698/-740
modulemanager.js
Refactor ModuleManager to extend AbstractModuleManager base class

third_party/closure/goog/module/modulemanager.js

  • Changed base class from goog.Disposable to
    goog.loader.AbstractModuleManager to align with new module loading
    architecture
  • Refactored to use abstract base class methods and properties, removing
    duplicate implementations
  • Changed moduleInfoMap_ from private to protected property and updated
    all references
  • Updated callback type and failure type enums to reference
    goog.loader.AbstractModuleManager instead of local definitions
  • Modified setLoaded() to work without parameters by using
    currentlyLoadingModule_ state
  • Improved getNotYetLoadedTransitiveDepIds_() with BFS algorithm and
    better dependency ordering
  • Updated logging calls from goog.log.info() to goog.log.fine() for
    consistency
  • Added getInstance() static method returning active module manager
    instance
  • Refactored disposal logic and added isDisposed() method
+211/-392
eventtargettester.js
Modernize closure library test module to ES6 syntax           

third_party/closure/goog/events/eventtargettester.js

  • Converted from legacy goog.provide/goog.require to modern goog.module
    syntax
  • Refactored module-level functions and enums into an exports object
    with nested commonTests property
  • Replaced global variable declarations with module-scoped let
    declarations
  • Updated class syntax from goog.inherits pattern to ES6 class syntax
    for TestEvent
  • Reorganized test functions into commonTests object while maintaining
    their functionality
+960/-949
string.js
Refactor string utilities to use internal module and safe APIs

third_party/closure/goog/string/string.js

  • Added new goog.require statements for goog.dom.safe,
    goog.html.uncheckedconversions, goog.string.Const, and
    goog.string.internal
  • Delegated multiple string utility functions to goog.string.internal
    implementations (e.g., startsWith, endsWith, trim, contains)
  • Updated JSDoc comments to use backticks instead of {@code} tags for
    inline code references
  • Modified goog.define calls to assign results to module properties
    instead of standalone calls
  • Removed private regex constants (AMP_RE_, LT_RE_, GT_RE_, etc.) that
    are now handled internally
  • Updated unescapeEntitiesUsingDom_ to use safe DOM APIs
    (goog.dom.safe.setInnerHtml) instead of direct innerHTML assignment
  • Changed type checks from goog.isDef() and goog.isString() to modern
    equivalents (!== undefined, typeof === 'string')
+114/-303
nexttick.js
Update async utilities to use safe DOM APIs                           

third_party/closure/goog/async/nexttick.js

  • Added new goog.require statements for safe DOM and HTML APIs
    (goog.dom, goog.dom.safe, goog.html.SafeHtml,
    goog.html.TrustedResourceUrl, goog.string.Const)
  • Replaced direct DOM manipulation with safe API calls:
    goog.dom.createElement(), goog.dom.safe.setIframeSrc(),
    goog.dom.safe.documentWrite()
  • Updated iframe creation to use safe resource URL instead of empty
    string assignment
  • Changed goog.isDef() check to modern !== undefined comparison
  • Added @suppress {missingProperties} annotation for setImmediate
    property access
+14/-10 
delay.js
Modernize type checks in delay module                                       

third_party/closure/goog/async/delay.js

  • Removed author JSDoc tag from file header
  • Updated goog.isDef() call to modern !== undefined comparison in
    start() method
+2/-2     
Documentation
2 files
unsafe.js
Improve documentation and remove visibility annotation     

third_party/closure/goog/html/sanitizer/unsafe.js

  • Removed @visibility annotation from JSDoc
  • Enhanced documentation for alsoAllowTags method to clarify that
    blacklisted tags are removed from blacklist when added to whitelist
  • Simplified parameter documentation by removing note about blacklist
    precedence
+3/-38   
textarearenderer.js
Update JSDoc formatting in TextareaRenderer                           

third_party/closure/goog/ui/textarearenderer.js

  • Updated JSDoc comment to use backticks for code formatting instead of
    {@code} tag
+1/-1     
Bug fix
3 files
combobox.js
Update type annotations to indicate nullable elements       

third_party/closure/goog/ui/combobox.js

  • Changed type annotation for input_ property from Element to ?Element
    to indicate nullable type
  • Changed type annotation for button_ property from Element to ?Element
    to indicate nullable type
+2/-10   
assertthat.js
Add forward declaration for Matcher type                                 

third_party/closure/goog/labs/testing/assertthat.js

  • Added goog.forwardDeclare for goog.labs.testing.Matcher to handle
    forward declaration
+1/-1     
style.js
Improve element visibility detection logic                             

third_party/closure/goog/testing/style/style.js

  • Added check for element being in document before determining
    visibility
  • Simplified visibility detection by using getComputedStyle() instead of
    custom style retrieval
  • Updated JSDoc to clarify that detached elements are considered
    invisible
+6/-22   
Additional files
101 files
BUILD.bazel +59/-59 
BUILD.bazel +1/-1     
test_bootstrap.js +2/-2     
BUILD.bazel +6/-6     
test_bootstrap.js +1/-1     
BUILD.bazel +2/-2     
closure_js_deps.bzl +1/-2     
test_suite.bzl +4/-1     
BUILD.bazel +7/-7     
BUILD.bazel +3/-3     
test_bootstrap.js +1/-1     
BUILD.bazel +208/-8 
BUILD.bazel +73/-0   
aria.js +6/-8     
attributes.js +10/-0   
BUILD.bazel +20/-0   
array.js +44/-42 
BUILD.bazel +23/-0   
asserts.js +110/-16
BUILD.bazel +118/-0 
animationdelay.js +1/-3     
conditionaldelay.js +11/-12 
debouncer.js +1/-1     
freelist.js +12/-10 
run.js +12/-7   
throttle.js +1/-1     
workqueue.js +3/-2     
base.js +3152/-1879
BUILD.bazel +22/-0   
nodejs.js +0/-2     
webworkers.js +6/-2     
BUILD.bazel +20/-0   
sets.js +104/-0 
BUILD.bazel +40/-0   
alpha.js +46/-23 
color.js +16/-35 
conformance_proto.txt +530/-0 
BUILD.bazel +245/-0 
aes.js +2/-3     
arc4.js +0/-1     
base64.js +171/-67
basen.js +33/-30 
blobhasher.js +4/-5     
blockcipher.js +0/-2     
bytestring_perf.html +0/-25   
cbc.js +0/-2     
crypt.js +6/-4     
crypt_perf.html +0/-85   
hash.js +0/-1     
hash32.js +1/-2     
hashtester.js +3/-2     
hmac.js +3/-5     
md5.js +3/-4     
md5_perf.html +0/-39   
pbkdf2.js +0/-1     
sha1.js +3/-4     
sha1_perf.html +0/-40   
sha2.js +5/-6     
sha224.js +0/-1     
sha224_perf.html +0/-40   
sha256.js +0/-1     
sha256_perf.html +0/-40   
sha2_64bit.js +15/-17 
sha384.js +0/-2     
sha512.js +0/-2     
sha512_256.js +0/-2     
sha512_perf.html +0/-41   
filteredmenu.css +1/-0     
BUILD.bazel +27/-0   
cssom.js +45/-37 
cssom_test_import_1.css +11/-0   
cssom_test_import_2.css +10/-0   
cssom_test_link_1.css +10/-0   
BUILD.bazel +30/-0   
style.js +13/-12 
style_test_import.css +10/-0   
BUILD.bazel +124/-0 
datamanager.js +2/-3     
datasource.js +1/-2     
expr.js +0/-1     
fastdatanode.js +14/-14 
jsdatasource.js +2/-3     
jsondatasource.js +11/-15 
jsxmlhttpdatasource.js +1/-3     
xmldatasource.js +2/-3     
BUILD.bazel +76/-0   
date.js +161/-57
datelike.js +0/-2     
daterange.js +1/-3     
duration.js +0/-1     
relative.js +179/-166
relativecommontests.js +606/-0 
relativewithplurals.js +0/-119 
utcdatetime.js +2/-2     
BUILD.bazel +119/-0 
cursor.js +1/-2     
db.js +1/-2     
error.js +14/-8   
index.js +65/-60 
indexeddb.js +5/-3     
Additional files not shown

We used to have a version of Google Closure Library tucked away in
`//third_party/closure/goog` We never really updated it, because
we switched to using `rules_closure`, and that bundles a different
version of Google Closure Library.

This PR vendors the version of Closure back into
`third_party/closure/goog` and then updates our builds and tests
to use.

This is a necessary prelude to updating `rules_closure` to the
latest release. That version no longer bundles a copy of closure,
so we need to be using a vendored one. However, the version we end
up on won't be _this_ version of closure because the later
`rules_closure` has an updated closure compiler that doesn't like
our code.

However, one thing at a time! Let's start by vendoring the thing
we're using and remove ourselves from the clutches of a bundled
version of the library.
@selenium-ci selenium-ci added B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations labels Dec 16, 2025
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Dec 16, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Dec 16, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Avoid code duplication for locales

Replace the duplicated definition of DateIntervalPatterns_az_Cyrl_AZ with an
alias to DateIntervalPatterns_az_Cyrl to reduce code and improve
maintainability.

third_party/closure/goog/i18n/dateintervalpatternsext.js [580-651]

 /** @const {!dateIntervalPatterns.DateIntervalPatterns} */
-exports.DateIntervalPatterns_az_Cyrl_AZ = {
-  YEAR_FULL: {
-    'G': 'G y – G y',
-    'y': 'y–y',
-    '_': 'y'
-  },
-  YEAR_FULL_WITH_ERA: {
-    'y': 'G y–y',
-    '_': 'G y'
-  },
-  YEAR_MONTH_ABBR: {
-    'G': 'G y MMM – G y MMM',
-    'M': 'MMM – MMM y',
-    'y': 'y MMM – y MMM',
-    '_': 'MMM, y'
-  },
-  YEAR_MONTH_FULL: {
-    'G': 'G y MMMM – G y MMMM',
-    'M': 'MMMM – MMMM y',
-    'y': 'MMMM y – MMMM y',
-    '_': 'y MMMM'
-  },
-  YEAR_MONTH_SHORT: {
-    'G': 'GGGGG y-MM – GGGGG y-MM',
-    '_': 'MM.y'
-  },
-  MONTH_DAY_ABBR: {
-    'd': 'd–d MMM',
-    'y': 'd MMM y – d MMM y',
-    '_': 'd MMM'
-  },
-  MONTH_DAY_FULL: {
-    'M': 'd MMMM – d MMMM',
-    'd': 'd–d MMMM',
-    'y': 'd MMMM y – d MMMM y',
-    '_': 'MMMM dd'
-  },
-  MONTH_DAY_SHORT: {
-    'y': 'dd.MM.y – dd.MM.y',
-    '_': 'dd.MM'
-  },
-  MONTH_DAY_MEDIUM: {
-    'M': 'd MMMM – d MMMM',
-    'd': 'd–d MMMM',
-    'y': 'd MMMM y – d MMMM y',
-    '_': 'MMMM d'
-  },
-  MONTH_DAY_YEAR_MEDIUM: {
-    'G': 'G y MMM d – G y MMM d',
-    'M': 'd MMM y – d MMM',
-    'd': 'y MMM d–d',
-    '_': 'd MMM y'
-  },
-  WEEKDAY_MONTH_DAY_MEDIUM: {
-    'Md': 'd MMM, E – d MMM, E',
-    'y': 'd MMM y, E – d MMM y, E',
-    '_': 'd MMM, EEE'
-  },
-  WEEKDAY_MONTH_DAY_YEAR_MEDIUM: {
-    'G': 'G y MMM d, E – G y MMM d, E',
-    'Md': 'd MMM y, E – d MMM, E',
-    'y': 'd MMM y, E – d MMM y, E',
-    '_': 'd MMM y, EEE'
-  },
-  DAY_ABBR: {
-    'M': 'dd.MM – dd.MM',
-    'd': 'd–d',
-    'y': 'dd.MM.y – dd.MM.y',
-    '_': 'd'
-  }
-};
+exports.DateIntervalPatterns_az_Cyrl_AZ = exports.DateIntervalPatterns_az_Cyrl;
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that DateIntervalPatterns_az_Cyrl_AZ is a duplicate of DateIntervalPatterns_az_Cyrl and proposes aliasing it, which reduces code size and improves maintainability.

Medium
Collapse locale aliases into loop

Refactor the repetitive one-line aliases for ar locales into a loop to reduce
code duplication and improve maintainability.

third_party/closure/goog/i18n/dateintervalpatternsext.js [201-277]

-exports.DateIntervalPatterns_ar_AE = dateIntervalPatterns.DateIntervalPatterns_ar;
-exports.DateIntervalPatterns_ar_BH = dateIntervalPatterns.DateIntervalPatterns_ar;
-exports.DateIntervalPatterns_ar_DJ = dateIntervalPatterns.DateIntervalPatterns_ar;
-exports.DateIntervalPatterns_ar_EH = dateIntervalPatterns.DateIntervalPatterns_ar;
-exports.DateIntervalPatterns_ar_ER = dateIntervalPatterns.DateIntervalPatterns_ar;
-...
+// at top of file, after base patterns are loaded
+[
+  'AE','BH','DJ','EH','ER','IL','IQ','JO','KM','KW','LB','LY','MA','MR',
+  'OM','PS','QA','SA','SD','SO','SS','SY','TD','TN','XB','YE'
+].forEach(region => {
+  exports[
+    `DateIntervalPatterns_ar_${region}`
+  ] = dateIntervalPatterns.DateIntervalPatterns_ar;
+});

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 5

__

Why: The suggestion proposes a valid refactoring to reduce repetitive code for ar locale aliases, which improves readability and maintainability, though it's primarily a stylistic improvement.

Low
Avoid code duplication by aliasing

Replace the duplicate definition of DateIntervalSymbols_az_Cyrl_AZ with an alias
to exports.DateIntervalSymbols_az_Cyrl to reduce code redundancy.

third_party/closure/goog/i18n/dateintervalsymbolsext.js [767-821]

 /** @const {!dateIntervalSymbols.DateIntervalSymbols} */
-exports.DateIntervalSymbols_az_Cyrl_AZ = {
-  FULL_DATE: {
-    'G': 'G y MMMM d, EEEE – G y MMMM d, EEEE',
-    'Md': 'd MMMM y, EEEE – d MMMM, EEEE',
-    '_': 'd MMMM y, EEEE'
-  },
-  LONG_DATE: {
-    'G': 'G y MMMM d – G y MMMM d',
-    'M': 'd MMMM y – d MMMM',
-    'd': 'y MMMM d–d',
-    '_': 'd MMMM y'
-  },
-  MEDIUM_DATE: {
-    'G': 'G y MMM d – G y MMM d',
-    'M': 'd MMM y – d MMM',
-    'd': 'y MMM d–d',
-    '_': 'd MMM y'
-  },
-  SHORT_DATE: {
-    'G': 'GGGGG yy-MM-dd – GGGGG yy-MM-dd',
-    '_': 'dd.MM.yy'
-  },
-  FULL_TIME: {
-    'Mdy': 'dd.MM.y HH:mm:ss zzzz',
-    '_': 'HH:mm:ss zzzz'
-  },
-  LONG_TIME: {
-    'Mdy': 'dd.MM.y HH:mm:ss z',
-    '_': 'HH:mm:ss z'
-  },
-  MEDIUM_TIME: {
-    'Mdy': 'dd.MM.y HH:mm:ss',
-    '_': 'HH:mm:ss'
-  },
-  SHORT_TIME: {
-    'Mdy': 'dd.MM.y HH:mm',
-    'ahm': 'HH:mm–HH:mm',
-    '_': 'HH:mm'
-  },
-  FULL_DATETIME: {
-    '_': 'd MMMM y, EEEE HH:mm:ss zzzz'
-  },
-  LONG_DATETIME: {
-    '_': 'd MMMM y HH:mm:ss z'
-  },
-  MEDIUM_DATETIME: {
-    '_': 'd MMM y HH:mm:ss'
-  },
-  SHORT_DATETIME: {
-    'ahm': 'dd.MM.yy HH:mm–HH:mm',
-    '_': 'dd.MM.yy HH:mm'
-  },
-  FALLBACK: '{0} – {1}'
-};
+exports.DateIntervalSymbols_az_Cyrl_AZ = exports.DateIntervalSymbols_az_Cyrl;
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies that DateIntervalSymbols_az_Cyrl_AZ is a duplicate of DateIntervalSymbols_az_Cyrl and proposes aliasing to reduce code duplication, which improves maintainability.

Low
Add module metadata

Add the module: 'goog' metadata to the async/freelist.js dependency declaration.

third_party/closure/goog/deps.js [50]

-goog.addDependency('async/freelist.js', ['goog.async.FreeList'], [], {'lang': 'es6'});
+goog.addDependency('async/freelist.js', ['goog.async.FreeList'], [], {'lang': 'es6', 'module': 'goog'});
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly points out missing module: 'goog' metadata, which is inconsistent with other ES6 module declarations in the PR and helps maintain the codebase's integrity.

Low
Add ES6 module metadata

Add {'lang': 'es6', 'module': 'goog'} metadata to the proto/proto.js dependency
declaration.

third_party/closure/goog/deps.js [28]

-goog.addDependency('proto/proto.js', ['goog.proto'], ['goog.proto.Serializer'], {});
+goog.addDependency('proto/proto.js', ['goog.proto'], ['goog.proto.Serializer'], {'lang': 'es6', 'module': 'goog'});
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies missing lang and module metadata, and adding it improves consistency with other module declarations in the PR.

Low
Possible issue
Use consistent test suite dependency

Update the dependency for crypt/ctr_test.js to use goog.testing.testSuite
instead of goog.testing.jsunit and add the module: 'goog' metadata for
consistency.

third_party/closure/goog/deps.js [86]

-goog.addDependency('crypt/ctr_test.js', ['goog.crypt.CtrTest'], ['goog.crypt', 'goog.crypt.Aes', 'goog.crypt.Ctr', 'goog.testing.jsunit'], {'lang': 'es6'});
+goog.addDependency('crypt/ctr_test.js', ['goog.crypt.CtrTest'], ['goog.crypt', 'goog.crypt.Aes', 'goog.crypt.Ctr', 'goog.testing.testSuite'], {'lang': 'es6', 'module': 'goog'});
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies an inconsistent test dependency (goog.testing.jsunit) and a missing module declaration, which aligns with the overall refactoring goal of the PR and prevents potential test loading issues.

Low
Update legacy test framework dependency

Update the dependency for base_test.js to use goog.testing.testSuite instead of
goog.testing.jsunit and add the module: 'goog' metadata for consistency.

third_party/closure/goog/deps.js [63]

-goog.addDependency('base_test.js', ['goog.baseTest'], ['goog.Promise', 'goog.Timer', 'goog.Uri', 'goog.dom', 'goog.dom.TagName', 'goog.object', 'goog.test_module', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit', 'goog.testing.recordFunction', 'goog.userAgent'], {'lang': 'es6'});
+goog.addDependency('base_test.js', ['goog.baseTest'], ['goog.Promise', 'goog.Timer', 'goog.Uri', 'goog.dom', 'goog.dom.TagName', 'goog.object', 'goog.test_module', 'goog.testing.PropertyReplacer', 'goog.testing.testSuite', 'goog.testing.recordFunction', 'goog.userAgent'], {'lang': 'es6', 'module': 'goog'});
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies an inconsistent test dependency (goog.testing.jsunit) and a missing module declaration, which aligns with the overall refactoring goal of the PR and prevents potential test loading issues.

Low
Correct inconsistent test dependency declaration

Update the dependency for date/relativecommontests.js to use
goog.testing.testSuite instead of goog.testing.jsunit and add the module: 'goog'
metadata for consistency.

third_party/closure/goog/deps.js [134]

-goog.addDependency('date/relativecommontests.js', ['goog.date.relativeCommonTests'], ['goog.date.DateTime', 'goog.date.relative', 'goog.i18n.DateTimeFormat', 'goog.i18n.DateTimePatterns_ar', 'goog.i18n.DateTimePatterns_bn', 'goog.i18n.DateTimePatterns_es', 'goog.i18n.DateTimePatterns_fa', 'goog.i18n.DateTimePatterns_fr', 'goog.i18n.DateTimePatterns_no', 'goog.i18n.DateTimeSymbols_ar', 'goog.i18n.DateTimeSymbols_bn', 'goog.i18n.DateTimeSymbols_es', 'goog.i18n.DateTimeSymbols_fa', 'goog.i18n.DateTimeSymbols_fr', 'goog.i18n.DateTimeSymbols_no', 'goog.i18n.NumberFormatSymbols_bn', 'goog.i18n.NumberFormatSymbols_en', 'goog.i18n.NumberFormatSymbols_fa', 'goog.i18n.NumberFormatSymbols_no', 'goog.i18n.relativeDateTimeSymbols', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit'], {'lang': 'es6'});
+goog.addDependency('date/relativecommontests.js', ['goog.date.relativeCommonTests'], ['goog.date.DateTime', 'goog.date.relative', 'goog.i18n.DateTimeFormat', 'goog.i18n.DateTimePatterns_ar', 'goog.i18n.DateTimePatterns_bn', 'goog.i18n.DateTimePatterns_es', 'goog.i18n.DateTimePatterns_fa', 'goog.i18n.DateTimePatterns_fr', 'goog.i18n.DateTimePatterns_no', 'goog.i18n.DateTimeSymbols_ar', 'goog.i18n.DateTimeSymbols_bn', 'goog.i18n.DateTimeSymbols_es', 'goog.i18n.DateTimeSymbols_fa', 'goog.i18n.DateTimeSymbols_fr', 'goog.i18n.DateTimeSymbols_no', 'goog.i18n.NumberFormatSymbols_bn', 'goog.i18n.NumberFormatSymbols_en', 'goog.i18n.NumberFormatSymbols_fa', 'goog.i18n.NumberFormatSymbols_no', 'goog.i18n.relativeDateTimeSymbols', 'goog.testing.PropertyReplacer', 'goog.testing.testSuite'], {'lang': 'es6', 'module': 'goog'});
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies an inconsistent test dependency (goog.testing.jsunit) and a missing module declaration, which aligns with the overall refactoring goal of the PR and prevents potential test loading issues.

Low
  • Update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations Review effort 4/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants