mediawiki/extensions/CookieConsent (main)

sourcepatches
$ date
--- stdout ---
Mon Mar 31 01:40:23 UTC 2025

--- end ---
$ git clone file:///srv/git/mediawiki-extensions-CookieConsent.git repo --depth=1 -b master
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/master
--- stdout ---
6ac505827fc8d19111fe0c3d76d48c80b5b73ad0 refs/heads/master

--- end ---
$ /usr/bin/npm i --package-lock-only
--- stdout ---

up to date, audited 319 packages in 8s

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
Editing .gitignore to remove package-lock.json
$ /usr/bin/npm audit --json
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {},
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 0,
      "high": 0,
      "critical": 0,
      "total": 0
    },
    "dependencies": {
      "prod": 1,
      "dev": 318,
      "optional": 0,
      "peer": 1,
      "peerOptional": 0,
      "total": 318
    }
  }
}

--- end ---
$ /usr/bin/composer install
--- stderr ---
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 38 installs, 0 updates, 0 removals
  - Locking composer/pcre (3.3.2)
  - Locking composer/semver (3.4.3)
  - Locking composer/spdx-licenses (1.5.8)
  - Locking composer/xdebug-handler (3.0.5)
  - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0)
  - Locking doctrine/deprecations (1.1.4)
  - Locking felixfbecker/advanced-json-rpc (v3.2.1)
  - Locking mediawiki/mediawiki-codesniffer (v45.0.0)
  - Locking mediawiki/mediawiki-phan-config (0.14.0)
  - Locking mediawiki/minus-x (1.1.3)
  - Locking mediawiki/phan-taint-check-plugin (6.0.0)
  - Locking microsoft/tolerant-php-parser (v0.1.2)
  - Locking netresearch/jsonmapper (v4.5.0)
  - Locking phan/phan (5.4.3)
  - Locking php-parallel-lint/php-console-color (v1.0.1)
  - Locking php-parallel-lint/php-console-highlighter (v1.0.0)
  - Locking php-parallel-lint/php-parallel-lint (v1.4.0)
  - Locking phpcsstandards/phpcsextra (1.2.1)
  - Locking phpcsstandards/phpcsutils (1.0.12)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.6.1)
  - Locking phpdocumentor/type-resolver (1.10.0)
  - Locking phpstan/phpdoc-parser (2.1.0)
  - Locking psr/container (2.0.2)
  - Locking psr/log (3.0.2)
  - Locking sabre/event (5.1.7)
  - Locking squizlabs/php_codesniffer (3.10.3)
  - Locking symfony/console (v7.2.5)
  - Locking symfony/deprecation-contracts (v3.5.1)
  - Locking symfony/polyfill-ctype (v1.31.0)
  - Locking symfony/polyfill-intl-grapheme (v1.31.0)
  - Locking symfony/polyfill-intl-normalizer (v1.31.0)
  - Locking symfony/polyfill-mbstring (v1.31.0)
  - Locking symfony/polyfill-php80 (v1.31.0)
  - Locking symfony/service-contracts (v3.5.1)
  - Locking symfony/string (v7.2.0)
  - Locking tysonandre/var_representation_polyfill (0.1.3)
  - Locking webmozart/assert (1.11.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 38 installs, 0 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Installing squizlabs/php_codesniffer (3.10.3): Extracting archive
  - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
  - Installing composer/pcre (3.3.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.31.0): Extracting archive
  - Installing phpcsstandards/phpcsutils (1.0.12): Extracting archive
  - Installing phpcsstandards/phpcsextra (1.2.1): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.31.0): Extracting archive
  - Installing composer/spdx-licenses (1.5.8): Extracting archive
  - Installing composer/semver (3.4.3): Extracting archive
  - Installing mediawiki/mediawiki-codesniffer (v45.0.0): Extracting archive
  - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.31.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.31.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.31.0): Extracting archive
  - Installing symfony/string (v7.2.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.5.1): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.5.1): Extracting archive
  - Installing symfony/console (v7.2.5): Extracting archive
  - Installing sabre/event (5.1.7): Extracting archive
  - Installing netresearch/jsonmapper (v4.5.0): Extracting archive
  - Installing microsoft/tolerant-php-parser (v0.1.2): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing phpstan/phpdoc-parser (2.1.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing doctrine/deprecations (1.1.4): Extracting archive
  - Installing phpdocumentor/type-resolver (1.10.0): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.6.1): Extracting archive
  - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive
  - Installing psr/log (3.0.2): Extracting archive
  - Installing composer/xdebug-handler (3.0.5): Extracting archive
  - Installing phan/phan (5.4.3): Extracting archive
  - Installing mediawiki/phan-taint-check-plugin (6.0.0): Extracting archive
  - Installing mediawiki/mediawiki-phan-config (0.14.0): Extracting archive
  - Installing mediawiki/minus-x (1.1.3): Extracting archive
  - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive
  - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive
  - Installing php-parallel-lint/php-parallel-lint (v1.4.0): Extracting archive
  0/36 [>---------------------------]   0%
 20/36 [===============>------------]  55%
 32/36 [========================>---]  88%
 36/36 [============================] 100%
Generating autoload files
16 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
--- stdout ---
PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils

--- end ---
Upgrading n:eslint-config-wikimedia from 0.28.2 -> 0.29.1
$ /usr/bin/npm install
--- stderr ---
npm WARN deprecated osenv@0.1.5: This package is no longer supported.
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
--- stdout ---

added 318 packages, and audited 319 packages in 3s

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ /usr/bin/npm install grunt-eslint@25.0.0 --save-exact
--- stdout ---

up to date, audited 319 packages in 773ms

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ ./node_modules/.bin/eslint . --fix
--- stdout ---

/src/repo/resources/ext.CookieConsent/ext.CookieConsent.js
  5:5  error  Parsing error: Unexpected token cookieConsent

✖ 1 problem (1 error, 0 warnings)


--- end ---
$ ./node_modules/.bin/eslint . -f json
--- stdout ---
[{"filePath":"/src/repo/Gruntfile.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.CookieConsent/ext.CookieConsent.init.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.CookieConsent/ext.CookieConsent.js","messages":[{"ruleId":null,"fatal":true,"severity":2,"message":"Parsing error: Unexpected token cookieConsent","line":5,"column":5,"nodeType":null}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * JavaScript file for the CookieConsent extension.\n */\n\nlet cookieConsent = ( function ( $ ) {\n\t'use strict';\n\n\t// Value of the above cookies when consent is given\n\tconst COOKIECONSENT_CONSENT_GIVEN_COOKIE_VALUE = 'given';\n\n\t// Cookie that is set when the dialog has been dismissed\n\tconst COOKIECONSENT_DIALOG_DISMISSED_COOKIE_NAME = 'cookieconsent_dialog_dismissed';\n\n\treturn {\n\t\t/**\n\t\t * Initializes the consent mode by doing the following:\n\t\t *\n\t\t * - Adding a click handler to `#manage-cookie-preferences` to allow users to update their consent preferences.\n\t\t * - Opening the simple (initial) consent dialog if the dialog has not been dismissed before.\n\t\t * - Processing any tags (scripts, iframes) if the dialog has been dismissed before.\n\t\t */\n\t\tinit: function() {\n\t\t\t$(\"#manage-cookie-preferences\").click(function (e) {\n\t\t\t\tcookieConsent.openDetailedDialog();\n\t\t\t});\n\n\t\t\tif ( !cookieConsent.isDismissed() ) {\n\t\t\t\tcookieConsent.openSimpleDialog();\n\t\t\t} else {\n\t\t\t\tcookieConsent.processTags();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns true if consent is given for the given category name, false otherwise.\n\t\t *\n\t\t * @param {string} categoryName\n\t\t * @returns {boolean}\n\t\t */\n\t\tisConsentGiven: function ( categoryName ) {\n\t\t\treturn mw.cookie.get( this.__getCookieName( categoryName ) ) === COOKIECONSENT_CONSENT_GIVEN_COOKIE_VALUE;\n\t\t},\n\n\t\t/**\n\t\t * Returns true if the consent dialog has been dismissed, false otherwise.\n\t\t */\n\t\tisDismissed: function () {\n\t\t\treturn mw.cookie.get( COOKIECONSENT_DIALOG_DISMISSED_COOKIE_NAME );\n\t\t},\n\n\t\t/**\n\t\t * Processes all script and iframe tags that depend on consent, and fires the 'cookie-consent-tags-processed'\n\t\t * event on the window after finishing.\n\t\t */\n\t\tprocessTags: function () {\n\t\t\tthis.__processScripts();\n\t\t\tthis.__processIframes();\n\n\t\t\tconst event = new CustomEvent('cookie-consent-tags-processed');\n\t\t\twindow.dispatchEvent(event);\n\t\t},\n\n\t\t/**\n\t\t * Opens the detailed cookie preferences dialog.\n\t\t */\n\t\topenDetailedDialog: function () {\n\t\t\tconst cookieConsent = this;\n\n\t\t\tfunction DetailedConsentDialog( config ) {\n\t\t\t\tDetailedConsentDialog.super.call( this, config );\n\t\t\t}\n\n\t\t\t// The consent dialog is a process dialog\n\t\t\t// @see https://www.mediawiki.org/wiki/OOUI/Windows/Process_Dialogs\n\t\t\tOO.inheritClass( DetailedConsentDialog, OO.ui.ProcessDialog );\n\n\t\t\tconst windowManager = new OO.ui.WindowManager();\n\t\t\t$( document.body ).append( windowManager.$element );\n\n\t\t\tconst consentDialog = new DetailedConsentDialog( {\n\t\t\t\tsize: 'medium',\n\t\t\t\tclasses: ['cookie-consent-dialog', 'cookie-consent-detailed-dialog'],\n\t\t\t} );\n\n\t\t\tDetailedConsentDialog.static.name = 'ext.CookieConsent.detailedConsentDialog';\n\t\t\tDetailedConsentDialog.static.title = mw.message( 'cookieconsent-detailed-dialog-title' ).text();\n\t\t\tDetailedConsentDialog.static.actions = [\n\t\t\t\t{\n\t\t\t\t\taction: 'save-preferences',\n\t\t\t\t\tlabel: mw.message( 'cookieconsent-save-preferences' ).text(),\n\t\t\t\t\tflags: [ 'primary', 'progressive' ]\n\t\t\t\t},\n\t\t\t];\n\n\t\t\tif ( mw.cookie.get( COOKIECONSENT_DIALOG_DISMISSED_COOKIE_NAME ) ) {\n\t\t\t\t// If the dialog has been dismissed before, add a \"Cancel\" button\n\t\t\t\tDetailedConsentDialog.static.actions.push( {\n\t\t\t\t\taction: 'cancel',\n\t\t\t\t\tlabel: mw.message( 'cancel' ).text(),\n\t\t\t\t\tflags: 'safe'\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t// Otherwise, add a back button\n\t\t\t\tDetailedConsentDialog.static.actions.push( {\n\t\t\t\t\taction: 'back',\n\t\t\t\t\tlabel: mw.message( 'back' ).text(),\n\t\t\t\t\tflags: ['safe', 'back']\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tDetailedConsentDialog.prototype.initialize = function () {\n\t\t\t\tDetailedConsentDialog.super.prototype.initialize.apply( this, arguments );\n\n\t\t\t\t// Necessary cookies checkbox\n\t\t\t\tconst necessaryCookiesFieldsetItem = new OO.ui.FieldLayout( new OO.ui.CheckboxInputWidget( { selected: true, disabled: true } ), {\n\t\t\t\t\tlabel: mw.message( 'cookieconsent-category-name-strictly-necessary' ).text(),\n\t\t\t\t\talign: 'inline',\n\t\t\t\t\thelp: mw.message( 'cookieconsent-category-desc-strictly-necessary' ).text()\n\t\t\t\t});\n\n\t\t\t\t// Other categories\n\t\t\t\tthis.preferenceCheckboxes = {};\n\t\t\t\tthis.preferenceFieldsetItems = [necessaryCookiesFieldsetItem];\n\n\t\t\t\tfor ( const [ categoryName, category ] of Object.entries( cookieConsent.__getConsentCategories() ) ) {\n\t\t\t\t\tthis.preferenceCheckboxes[categoryName] = new OO.ui.CheckboxInputWidget();\n\t\t\t\t\tthis.preferenceFieldsetItems.push(new OO.ui.FieldLayout( this.preferenceCheckboxes[categoryName], {\n\t\t\t\t\t\tlabel: category.namemsg ? mw.message( category.namemsg ).text() : category.name,\n\t\t\t\t\t\talign: 'inline',\n\t\t\t\t\t\thelp: category.descriptionmsg ? mw.message( category.descriptionmsg ).text() : category.description\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis.panel = new OO.ui.PanelLayout( {\n\t\t\t\t\tpadded: true,\n\t\t\t\t\texpanded: false\n\t\t\t\t} );\n\n\t\t\t\tthis.content = new OO.ui.FieldsetLayout( { classes: [ 'cookieconsent-dialog-fieldset-layout' ] } )\n\t\t\t\t\t.addItems( this.preferenceFieldsetItems );\n\n\t\t\t\tthis.panel.$element.append( mw.message( 'cookieconsent-detailed-dialog-intro' ).parse() );\n\t\t\t\tthis.panel.$element.append( this.content.$element );\n\t\t\t\tthis.panel.$element.append( mw.message( 'cookieconsent-detailed-dialog-outro' ).parse() );\n\n\t\t\t\tthis.$body.append( this.panel.$element );\n\t\t\t}\n\n\t\t\t// Let the dialog know which consent preferences have (previously) been given, so that the checkboxes can be\n\t\t\t// (un)checked accordingly\n\t\t\tDetailedConsentDialog.prototype.setConsentPreferences = function ( consentPreferences ) {\n\t\t\t\tfor ( const categoryName of Object.keys( cookieConsent.__getConsentCategories() ) ) {\n\t\t\t\t\tthis.preferenceCheckboxes[categoryName].setSelected( consentPreferences[categoryName] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get the current consent preferences as visible in the dialog\n\t\t\tDetailedConsentDialog.prototype.getConsentPreferences = function () {\n\t\t\t\tconst consentPreferences = {};\n\n\t\t\t\tfor ( const categoryName of Object.keys( cookieConsent.__getConsentCategories() ) ) {\n\t\t\t\t\tconsentPreferences[categoryName] = this.preferenceCheckboxes[categoryName].isSelected();\n\t\t\t\t}\n\n\t\t\t\treturn consentPreferences;\n\t\t\t}\n\n\t\t\t// The setup process takes data inserted during the initialisation of the window, and updates the presentation\n\t\t\t// accordingly.\n\t\t\tDetailedConsentDialog.prototype.getSetupProcess = function ( data ) {\n\t\t\t\treturn DetailedConsentDialog.super.prototype.getSetupProcess.call( this, data )\n\t\t\t\t\t.next( () => this.setConsentPreferences( data.consentPreferences ), this );\n\t\t\t}\n\n\t\t\tDetailedConsentDialog.prototype.getActionProcess = function ( action ) {\n\t\t\t\treturn new OO.ui.Process( function () {\n\t\t\t\t\tif ( action === 'save-preferences' ) {\n\t\t\t\t\t\tcookieConsent.__updateConsentPreferences( this.getConsentPreferences() );\n\t\t\t\t\t} else if ( action === 'cancel' ) {\n\t\t\t\t\t\twindowManager.closeWindow( consentDialog );\n\t\t\t\t\t} else if ( action === 'back' ) {\n\t\t\t\t\t\tcookieConsent.openSimpleDialog();\n\t\t\t\t\t\twindowManager.closeWindow( consentDialog );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback to parent handler\n\t\t\t\t\t\treturn DetailedConsentDialog.super.prototype.getActionProcess.call( this, action );\n\t\t\t\t\t}\n\t\t\t\t}, this );\n\t\t\t}\n\n\t\t\tDetailedConsentDialog.prototype.getBodyHeight = function () {\n\t\t\t\treturn this.panel.$element.outerHeight( true );\n\t\t\t}\n\n\t\t\twindowManager.addWindows( [ consentDialog ] );\n\t\t\twindowManager.openWindow( consentDialog, { consentPreferences: cookieConsent.__getConsentPreferences() } );\n\t\t},\n\n\t\t/**\n\t\t * Opens the simple cookie preferences dialog.\n\t\t */\n\t\topenSimpleDialog: function () {\n\t\t\tconst cookieConsent = this;\n\n\t\t\tfunction SimpleConsentDialog( config ) {\n\t\t\t\tSimpleConsentDialog.super.call( this, config );\n\t\t\t}\n\n\t\t\t// The consent dialog is a process dialog\n\t\t\t// @see https://www.mediawiki.org/wiki/OOUI/Windows/Process_Dialogs\n\t\t\tOO.inheritClass( SimpleConsentDialog, OO.ui.ProcessDialog );\n\n\t\t\tconst windowManager = new OO.ui.WindowManager();\n\t\t\t$( document.body ).append( windowManager.$element );\n\n\t\t\tconst windowWidth = window.innerWidth\n\t\t\t\t|| document.documentElement.clientWidth\n\t\t\t\t|| document.body.clientWidth;\n\n\t\t\tconst consentDialog = new SimpleConsentDialog( {\n\t\t\t\tsize: windowWidth < 720 ? 'small' : 'medium',\n\t\t\t\tclasses: ['cookie-consent-dialog', 'cookie-consent-simple-dialog'],\n\t\t\t} );\n\n\t\t\tSimpleConsentDialog.static.name = 'ext.CookieConsent.simpleConsentDialog';\n\t\t\tSimpleConsentDialog.static.title = mw.message( 'cookieconsent-simple-dialog-title' ).text();\n\t\t\tSimpleConsentDialog.static.actions = [\n\t\t\t\t{\n\t\t\t\t\taction: 'accept-all',\n\t\t\t\t\ticon: 'check',\n\t\t\t\t\tlabel: mw.message( 'cookieconsent-accept-all' ).text(),\n\t\t\t\t\tflags: [ 'progressive' ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\taction: 'manage-preferences',\n\t\t\t\t\tlabel: mw.message( 'cookieconsent-manage-preferences-short' ).text(),\n\t\t\t\t}\n\t\t\t];\n\n\t\t\tSimpleConsentDialog.prototype.initialize = function () {\n\t\t\t\tSimpleConsentDialog.super.prototype.initialize.apply( this, arguments );\n\n\t\t\t\tthis.panel = new OO.ui.PanelLayout( {\n\t\t\t\t\tpadded: true,\n\t\t\t\t\texpanded: false,\n\t\t\t\t} );\n\n\t\t\t\tthis.panel.$element.append( mw.message( 'cookieconsent-simple-dialog-content' ).parse() );\n\n\t\t\t\tthis.$body.append( this.panel.$element );\n\t\t\t}\n\n\t\t\tSimpleConsentDialog.prototype.getActionProcess = function ( action ) {\n\t\t\t\treturn new OO.ui.Process( function () {\n\t\t\t\t\tif ( action === 'accept-all' ) {\n\t\t\t\t\t\tconst consentPreferences = {};\n\n\t\t\t\t\t\tfor ( const categoryName of Object.keys( cookieConsent.__getConsentCategories() ) ) {\n\t\t\t\t\t\t\tconsentPreferences[categoryName] = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcookieConsent.__updateConsentPreferences( consentPreferences );\n\t\t\t\t\t\twindowManager.closeWindow( consentDialog );\n\t\t\t\t\t} else if ( action === 'manage-preferences' ) {\n\t\t\t\t\t\tcookieConsent.openDetailedDialog();\n\t\t\t\t\t\twindowManager.closeWindow( consentDialog );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback to parent handler\n\t\t\t\t\t\treturn SimpleConsentDialog.super.prototype.getActionProcess.call( this, action );\n\t\t\t\t\t}\n\t\t\t\t}, this );\n\t\t\t}\n\n\t\t\tSimpleConsentDialog.prototype.getBodyHeight = function () {\n\t\t\t\treturn this.panel.$element.outerHeight( true );\n\t\t\t}\n\n\t\t\twindowManager.addWindows( [ consentDialog ] );\n\t\t\twindowManager.openWindow( consentDialog, { consentPreferences: cookieConsent.__getConsentPreferences() } );\n\t\t},\n\n\t\t__getCookieName: function( categoryName ) {\n\t\t\treturn 'cookieconsent_consent_' + categoryName;\n\t\t},\n\n\t\t__getConsentCategories: function () {\n\t\t\treturn mw.config.get( 'wgCookieConsentCategories' );\n\t\t},\n\n\t\t__getConsentPreferences: function () {\n\t\t\tconst preferences = {};\n\n\t\t\tfor ( const categoryName of Object.keys( this.__getConsentCategories() ) ) {\n\t\t\t\tpreferences[categoryName] = this.isConsentGiven( categoryName );\n\t\t\t}\n\n\t\t\treturn preferences;\n\t\t},\n\n\t\t__updateConsentPreferences: function( consentPreferences ) {\n\t\t\tfor ( let [categoryName, isConsented] of Object.entries( consentPreferences ) ) {\n\t\t\t\tconst cookieName = this.__getCookieName( categoryName );\n\t\t\t\tconst cookieValue = isConsented ? COOKIECONSENT_CONSENT_GIVEN_COOKIE_VALUE : null;\n\t\t\t\tconst cookieOptions = isConsented ?\n\t\t\t\t\t{ expires: 60 * 60 * 24 * 365 } : // 1 year\n\t\t\t\t\t{};\n\n\t\t\t\tmw.cookie.set( cookieName, cookieValue, cookieOptions );\n\t\t\t}\n\n\t\t\tif ( !mw.cookie.get( COOKIECONSENT_DIALOG_DISMISSED_COOKIE_NAME ) ) {\n\t\t\t\t// Set the dialog to \"dismissed\" to disable automatic opening\n\t\t\t\tmw.cookie.set(\n\t\t\t\t\tCOOKIECONSENT_DIALOG_DISMISSED_COOKIE_NAME,\n\t\t\t\t\t'dismissed',\n\t\t\t\t\t{ expires: 60 * 60 * 24 * 365 } // 1 year\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Reload the page\n\t\t\tlocation.reload();\n\t\t},\n\n\t\t__enableScript: function ( script ) {\n\t\t\tconst newScript = document.createElement('script');\n\t\t\tnewScript.text = script.text;\n\t\t\tfor ( const attributeName of script.getAttributeNames() ) {\n\t\t\t\tnewScript.setAttribute( attributeName, script.getAttribute( attributeName ) );\n\t\t\t}\n\n\t\t\tnewScript.setAttribute('type', 'text/javascript');\n\n\t\t\tconst parent = script.parentElement;\n\n\t\t\tparent.insertBefore(newScript, script);\n\t\t\tparent.removeChild(script);\n\t\t},\n\n\t\t__enableIframe: function ( iframe ) {\n\t\t\tconst src = iframe.getAttribute( 'data-src' );\n\t\t\tiframe.setAttribute( 'src', src );\n\t\t},\n\n\t\t__processScripts: function() {\n\t\t\tconst scripts = document.querySelectorAll( 'script[data-cookieconsent]' );\n\t\t\tfor ( const script of scripts ) {\n\t\t\t\tconst categories = script.getAttribute( 'data-cookieconsent' ).split(',');\n\t\t\t\tconst consents = categories.map((category) => cookieConsent.isConsentGiven( category ) );\n\t\t\t\tif ( consents.some( ( p ) => p ) ) {\n\t\t\t\t\tthis.__enableScript( script );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t__processIframes: function() {\n\t\t\tconst iframes = document.querySelectorAll( 'iframe[data-cookieconsent]' );\n\t\t\tfor ( const iframe of iframes ) {\n\t\t\t\tconst categories = iframe.getAttribute( 'data-cookieconsent' ).split(',');\n\t\t\t\tconst consents = categories.map((category) => cookieConsent.isConsentGiven( category ) );\n\t\t\t\tif ( consents.some( ( p ) => p ) ) {\n\t\t\t\t\tthis.__enableIframe( iframe );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n} )( jQuery );\n\nwindow.cookieConsent = cookieConsent;\n","usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]}]}]

--- end ---
$ /usr/bin/npm ci
--- stderr ---
npm WARN deprecated osenv@0.1.5: This package is no longer supported.
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
--- stdout ---

added 318 packages, and audited 319 packages in 4s

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

--- end ---
$ /usr/bin/npm test
--- stdout ---

> cookieconsent@0.1.0 test
> grunt test

Running "eslint:all" (eslint) task
Warning: Could not find config file. Use --force to continue.

Aborted due to warnings.

--- end ---
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/runner-0.1.0-py3.11.egg/runner/__init__.py", line 1964, in main
    libup.run(args.repo, args.output, args.branch)
  File "/venv/lib/python3.11/site-packages/runner-0.1.0-py3.11.egg/runner/__init__.py", line 1902, in run
    self.npm_upgrade(plan)
  File "/venv/lib/python3.11/site-packages/runner-0.1.0-py3.11.egg/runner/__init__.py", line 1252, in npm_upgrade
    self.npm_test()
  File "/venv/lib/python3.11/site-packages/runner-0.1.0-py3.11.egg/runner/__init__.py", line 325, in npm_test
    self.check_call(["npm", "test"])
  File "/venv/lib/python3.11/site-packages/runner-0.1.0-py3.11.egg/runner/shell2.py", line 59, in check_call
    res.check_returncode()
  File "/usr/lib/python3.11/subprocess.py", line 502, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/usr/bin/npm', 'test']' returned non-zero exit status 3.

composer dependencies

Dependencies
Development dependencies

npm dependencies

Development dependencies

Logs

Source code is licensed under the AGPL.