mediawiki/libs/node-cssjanus: main (log #1827616)

sourcepatches

This run took 31 seconds.

From cf097e14908619d003f2d3927d228070de378746 Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Sat, 29 Mar 2025 04:43:36 +0000
Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.29.1

Change-Id: Ie041f6bd471cc8af90adc9022aed43565f99bca1
---
 package-lock.json | 33 ++++++++++++++++++---------------
 package.json      |  2 +-
 test/bench.js     |  2 +-
 3 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index e64fb03..eccdaa0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,7 @@
 			"license": "Apache-2.0",
 			"devDependencies": {
 				"eslint": "8.57.0",
-				"eslint-config-wikimedia": "0.28.2",
+				"eslint-config-wikimedia": "0.29.1",
 				"nyc": "^15.1.0",
 				"qunit": "2.24.1"
 			},
@@ -1446,9 +1446,9 @@
 			}
 		},
 		"node_modules/eslint-config-wikimedia": {
-			"version": "0.28.2",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
-			"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
+			"version": "0.29.1",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz",
+			"integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==",
 			"dev": true,
 			"dependencies": {
 				"browserslist-config-wikimedia": "^0.7.0",
@@ -1461,13 +1461,16 @@
 				"eslint-plugin-mediawiki": "^0.7.0",
 				"eslint-plugin-mocha": "^10.4.3",
 				"eslint-plugin-n": "^17.7.0",
-				"eslint-plugin-no-jquery": "^3.0.1",
+				"eslint-plugin-no-jquery": "^3.1.1",
 				"eslint-plugin-qunit": "^8.1.1",
 				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^53.0.0",
 				"eslint-plugin-vue": "^9.26.0",
 				"eslint-plugin-wdio": "^8.24.12",
 				"eslint-plugin-yml": "^1.14.0"
+			},
+			"engines": {
+				"node": ">=18 <23"
 			}
 		},
 		"node_modules/eslint-plugin-compat": {
@@ -1665,9 +1668,9 @@
 			}
 		},
 		"node_modules/eslint-plugin-no-jquery": {
-			"version": "3.0.1",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
-			"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
+			"version": "3.1.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz",
+			"integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==",
 			"dev": true,
 			"peerDependencies": {
 				"eslint": ">=8.0.0"
@@ -5342,9 +5345,9 @@
 			}
 		},
 		"eslint-config-wikimedia": {
-			"version": "0.28.2",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
-			"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
+			"version": "0.29.1",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz",
+			"integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==",
 			"dev": true,
 			"requires": {
 				"browserslist-config-wikimedia": "^0.7.0",
@@ -5357,7 +5360,7 @@
 				"eslint-plugin-mediawiki": "^0.7.0",
 				"eslint-plugin-mocha": "^10.4.3",
 				"eslint-plugin-n": "^17.7.0",
-				"eslint-plugin-no-jquery": "^3.0.1",
+				"eslint-plugin-no-jquery": "^3.1.1",
 				"eslint-plugin-qunit": "^8.1.1",
 				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^53.0.0",
@@ -5492,9 +5495,9 @@
 			}
 		},
 		"eslint-plugin-no-jquery": {
-			"version": "3.0.1",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
-			"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
+			"version": "3.1.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz",
+			"integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==",
 			"dev": true,
 			"requires": {}
 		},
diff --git a/package.json b/package.json
index 7d6f496..45fd2d7 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
 	"dependencies": {},
 	"devDependencies": {
 		"eslint": "8.57.0",
-		"eslint-config-wikimedia": "0.28.2",
+		"eslint-config-wikimedia": "0.29.1",
 		"nyc": "^15.1.0",
 		"qunit": "2.24.1"
 	},
diff --git a/test/bench.js b/test/bench.js
index 813c5db..82a5f5e 100644
--- a/test/bench.js
+++ b/test/bench.js
@@ -93,7 +93,7 @@ async function getFixture( name, sha1, url ) {
 	data = Buffer.from( data, 'base64' ).toString( 'utf8' );
 
 	if ( checksum( 'sha1', data ) !== sha1 ) {
-		return Promise.reject( new Error( 'Checksum mis-match' ) );
+		throw new Error( 'Checksum mis-match' );
 	}
 
 	fs.writeFileSync( file, data );
-- 
2.39.2

$ date
--- stdout ---
Sat Mar 29 04:43:15 UTC 2025

--- end ---
$ git clone file:///srv/git/mediawiki-libs-node-cssjanus.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 ---
5b7eefcceeb385ae29f6a85aeec0675561bbc052 refs/heads/master

--- end ---
$ /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": 359,
      "optional": 0,
      "peer": 1,
      "peerOptional": 0,
      "total": 359
    }
  }
}

--- end ---
Upgrading n:eslint-config-wikimedia from 0.28.2 -> 0.29.1
$ /usr/bin/npm install
--- stdout ---

added 359 packages, and audited 360 packages in 4s

67 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 ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

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

/src/repo/src/cssjanus.js
  79:24  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp

/src/repo/test/bench.js
   84:10  warning  Found readFileSync from package "fs" with non literal argument at index 0   security/detect-non-literal-fs-filename
   99:2   warning  Found writeFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  136:2   warning  Don't use process.exit(); throw an error instead                            n/no-process-exit

✖ 4 problems (0 errors, 4 warnings)


--- end ---
$ ./node_modules/.bin/eslint . -f json
--- stdout ---
[{"filePath":"/src/repo/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/cssjanus.js","messages":[{"ruleId":"security/detect-non-literal-regexp","severity":1,"message":"Found non-literal argument to RegExp Constructor","line":79,"column":24,"nodeType":"NewExpression","endLine":79,"endColumn":60}],"suppressedMessages":[{"ruleId":"quote-props","severity":2,"message":"Unnecessarily quoted property 'transform' found.","line":334,"column":3,"nodeType":"Property","messageId":"unnecessarilyQuotedProperty","endLine":413,"endColumn":4,"fix":{"range":[12761,12772],"text":"transform"},"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"dot-notation","severity":2,"message":"[\"cssjanus\"] is better written in dot notation.","line":457,"column":10,"nodeType":"Literal","messageId":"useDot","endLine":457,"endColumn":20,"fix":{"range":[17401,17415],"text":".cssjanus"},"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * CSSJanus. https://www.mediawiki.org/wiki/CSSJanus\n *\n * Copyright 2014 Trevor Parscal\n * Copyright 2010 Roan Kattouw\n * Copyright 2008 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar cssjanus;\n\n/**\n * Create a tokenizer object.\n *\n * This utility class is used by CSSJanus to protect strings by replacing them temporarily with\n * tokens and later transforming them back.\n *\n * @class\n * @constructor\n * @param {RegExp} regex Regular expression whose matches to replace by a token\n * @param {string} token Placeholder text\n */\nfunction Tokenizer( regex, token ) {\n\n\tvar matches = [],\n\t\tindex = 0;\n\n\t/**\n\t * Add a match.\n\t *\n\t * @private\n\t * @param {string} match Matched string\n\t * @return {string} Token to leave in the matched string's place\n\t */\n\tfunction tokenizeCallback( match ) {\n\t\tmatches.push( match );\n\t\treturn token;\n\t}\n\n\t/**\n\t * Get a match.\n\t *\n\t * @private\n\t * @return {string} Original matched string to restore\n\t */\n\tfunction detokenizeCallback() {\n\t\treturn matches[ index++ ];\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Replace matching strings with tokens.\n\t\t *\n\t\t * @param {string} str String to tokenize\n\t\t * @return {string} Tokenized string\n\t\t */\n\t\ttokenize: function ( str ) {\n\t\t\treturn str.replace( regex, tokenizeCallback );\n\t\t},\n\n\t\t/**\n\t\t * Restores tokens to their original values.\n\t\t *\n\t\t * @param {string} str String previously run through tokenize()\n\t\t * @return {string} Original string\n\t\t */\n\t\tdetokenize: function ( str ) {\n\t\t\treturn str.replace( new RegExp( '(' + token + ')', 'g' ), detokenizeCallback );\n\t\t}\n\t};\n}\n\n/**\n * Create a CSSJanus object.\n *\n * CSSJanus transforms CSS rules with horizontal relevance so that a left-to-right stylesheet can\n * become a right-to-left stylesheet automatically. Processing can be bypassed for an entire rule\n * or a single property by adding a / * @noflip * / comment above the rule or property.\n *\n * @class\n * @constructor\n */\nfunction CSSJanus() {\n\n\tvar\n\t\t// Tokens\n\t\ttemporaryToken = '`TMP`',\n\t\ttemporaryLtrToken = '`TMPLTR`',\n\t\ttemporaryRtlToken = '`TMPRTL`',\n\t\tnoFlipSingleToken = '`NOFLIP_SINGLE`',\n\t\tnoFlipClassToken = '`NOFLIP_CLASS`',\n\t\tcommentToken = '`COMMENT`',\n\t\t// Patterns\n\t\tnonAsciiPattern = '[^\\\\u0020-\\\\u007e]',\n\t\tunicodePattern = '(?:(?:\\\\\\\\[0-9a-f]{1,6})(?:\\\\r\\\\n|\\\\s)?)',\n\t\tnumPattern = '(?:[0-9]*\\\\.[0-9]+|[0-9]+)',\n\t\tunitPattern = '(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)',\n\t\tdirectionPattern = 'direction\\\\s*:\\\\s*',\n\t\turlSpecialCharsPattern = '[!#$%&*-~]',\n\t\tvalidAfterUriCharsPattern = '[\\'\"]?\\\\s*',\n\t\tnonLetterPattern = '(^|[^a-zA-Z])',\n\t\tcharsWithinSelectorPattern = '[^\\\\}]*?',\n\t\tnoFlipPattern = '\\\\/\\\\*\\\\!?\\\\s*@noflip\\\\s*\\\\*\\\\/',\n\t\tcommentPattern = '\\\\/\\\\*[^*]*\\\\*+([^\\\\/*][^*]*\\\\*+)*\\\\/',\n\t\tescapePattern = '(?:' + unicodePattern + '|\\\\\\\\[^\\\\r\\\\n\\\\f0-9a-f])',\n\t\tnmstartPattern = '(?:[_a-z]|' + nonAsciiPattern + '|' + escapePattern + ')',\n\t\tnmcharPattern = '(?:[_a-z0-9-]|' + nonAsciiPattern + '|' + escapePattern + ')',\n\t\tidentPattern = '-?' + nmstartPattern + nmcharPattern + '*',\n\t\tquantPattern = numPattern + '(?:\\\\s*' + unitPattern + '|' + identPattern + ')?',\n\t\tsignedQuantPattern = '((?:-?' + quantPattern + ')|(?:inherit|auto))',\n\t\tsignedQuantSimplePattern = '(?:-?' + numPattern + '(?:\\\\s*' + unitPattern + ')?)',\n\t\tmathOperatorsPattern = '(?:\\\\+|\\\\-|\\\\*|\\\\/)',\n\t\tallowedCharsPattern = '(?:\\\\(|\\\\)|\\\\t| )',\n\t\tcalcEquationPattern = '(?:' + allowedCharsPattern + '|' + signedQuantSimplePattern + '|' + mathOperatorsPattern + '){3,}',\n\t\tcalcPattern = '(?:calc\\\\((?:' + calcEquationPattern + ')\\\\))',\n\t\tsignedQuantCalcPattern = '((?:-?' + quantPattern + ')|(?:inherit|auto)|' + calcPattern + ')',\n\t\tfourNotationQuantPropsPattern = '((?:margin|padding|border-width)\\\\s*:\\\\s*)',\n\t\tfourNotationColorPropsPattern = '((?:-color|border-style)\\\\s*:\\\\s*)',\n\t\tcolorPattern = '(#?' + nmcharPattern + '+|(?:rgba?|hsla?)\\\\([ \\\\d.,%-]+\\\\))',\n\t\t// The use of a lazy match (\"*?\") may cause a backtrack limit to be exceeded before finding\n\t\t// the intended match. This affects 'urlCharsPattern' and 'lookAheadNotOpenBracePattern'.\n\t\t// We have not yet found this problem on Node.js, but we have on PHP 7, where it was\n\t\t// mitigated by using a possessive quantifier (\"*+\"), which are not supported in JS.\n\t\t// See <https://phabricator.wikimedia.org/T215746#4944830>.\n\t\turlCharsPattern = '(?:' + urlSpecialCharsPattern + '|' + nonAsciiPattern + '|' + escapePattern + ')*?',\n\t\tlookAheadNotLetterPattern = '(?![a-zA-Z])',\n\t\tlookAheadNotOpenBracePattern = '(?!(' + nmcharPattern + '|\\\\r?\\\\n|\\\\s|#|\\\\:|\\\\.|\\\\,|\\\\+|>|~|\\\\(|\\\\)|\\\\[|\\\\]|=|\\\\*=|~=|\\\\^=|\\'[^\\']*\\'|\"[^\"]*\"|' + commentToken + ')*?{)',\n\t\tlookAheadNotClosingParenPattern = '(?!' + urlCharsPattern + validAfterUriCharsPattern + '\\\\))',\n\t\tlookAheadForClosingParenPattern = '(?=' + urlCharsPattern + validAfterUriCharsPattern + '\\\\))',\n\t\tsuffixPattern = '(\\\\s*(?:!important\\\\s*)?[;}])',\n\t\t// Regular expressions\n\t\ttemporaryTokenRegExp = /`TMP`/g,\n\t\ttemporaryLtrTokenRegExp = /`TMPLTR`/g,\n\t\ttemporaryRtlTokenRegExp = /`TMPRTL`/g,\n\t\tcommentRegExp = new RegExp( commentPattern, 'gi' ),\n\t\tnoFlipSingleRegExp = new RegExp( '(' + noFlipPattern + lookAheadNotOpenBracePattern + '[^;}]+;?)', 'gi' ),\n\t\tnoFlipClassRegExp = new RegExp( '(' + noFlipPattern + charsWithinSelectorPattern + '})', 'gi' ),\n\t\tdirectionLtrRegExp = new RegExp( '(' + directionPattern + ')ltr', 'gi' ),\n\t\tdirectionRtlRegExp = new RegExp( '(' + directionPattern + ')rtl', 'gi' ),\n\t\tleftRegExp = new RegExp( nonLetterPattern + '(left)' + lookAheadNotLetterPattern + lookAheadNotClosingParenPattern + lookAheadNotOpenBracePattern, 'gi' ),\n\t\trightRegExp = new RegExp( nonLetterPattern + '(right)' + lookAheadNotLetterPattern + lookAheadNotClosingParenPattern + lookAheadNotOpenBracePattern, 'gi' ),\n\t\tleftInUrlRegExp = new RegExp( nonLetterPattern + '(left)' + lookAheadForClosingParenPattern, 'gi' ),\n\t\trightInUrlRegExp = new RegExp( nonLetterPattern + '(right)' + lookAheadForClosingParenPattern, 'gi' ),\n\t\tltrDirSelector = /(:dir\\( *)ltr( *\\))/g,\n\t\trtlDirSelector = /(:dir\\( *)rtl( *\\))/g,\n\t\tltrInUrlRegExp = new RegExp( nonLetterPattern + '(ltr)' + lookAheadForClosingParenPattern, 'gi' ),\n\t\trtlInUrlRegExp = new RegExp( nonLetterPattern + '(rtl)' + lookAheadForClosingParenPattern, 'gi' ),\n\t\tcursorEastRegExp = new RegExp( nonLetterPattern + '([ns]?)e-resize', 'gi' ),\n\t\tcursorWestRegExp = new RegExp( nonLetterPattern + '([ns]?)w-resize', 'gi' ),\n\t\tfourNotationQuantRegExp = new RegExp( fourNotationQuantPropsPattern + signedQuantCalcPattern + '(\\\\s+)' + signedQuantCalcPattern + '(\\\\s+)' + signedQuantCalcPattern + '(\\\\s+)' + signedQuantCalcPattern + suffixPattern, 'gi' ),\n\t\tfourNotationColorRegExp = new RegExp( fourNotationColorPropsPattern + colorPattern + '(\\\\s+)' + colorPattern + '(\\\\s+)' + colorPattern + '(\\\\s+)' + colorPattern + suffixPattern, 'gi' ),\n\t\tbgHorizontalPercentageRegExp = new RegExp( '(background(?:-position)?\\\\s*:\\\\s*(?:[^:;}\\\\s]+\\\\s+)*?)(' + quantPattern + ')', 'gi' ),\n\t\tbgHorizontalPercentageXRegExp = new RegExp( '(background-position-x\\\\s*:\\\\s*)(-?' + numPattern + '%)', 'gi' ),\n\t\t// border-radius: <length or percentage>{1,4} [optional: / <length or percentage>{1,4} ]\n\t\tborderRadiusRegExp = new RegExp( '(border-radius\\\\s*:\\\\s*)' + signedQuantPattern + '(?:(?:\\\\s+' + signedQuantPattern + ')(?:\\\\s+' + signedQuantPattern + ')?(?:\\\\s+' + signedQuantPattern + ')?)?' +\n\t\t\t'(?:(?:(?:\\\\s*\\\\/\\\\s*)' + signedQuantPattern + ')(?:\\\\s+' + signedQuantPattern + ')?(?:\\\\s+' + signedQuantPattern + ')?(?:\\\\s+' + signedQuantPattern + ')?)?' + suffixPattern, 'gi' ),\n\t\tboxShadowRegExp = new RegExp( '(box-shadow\\\\s*:\\\\s*(?:inset\\\\s*)?)' + signedQuantPattern, 'gi' ),\n\t\ttextShadow1RegExp = new RegExp( '(text-shadow\\\\s*:\\\\s*)' + signedQuantPattern + '(\\\\s*)' + colorPattern, 'gi' ),\n\t\ttextShadow2RegExp = new RegExp( '(text-shadow\\\\s*:\\\\s*)' + colorPattern + '(\\\\s*)' + signedQuantPattern, 'gi' ),\n\t\ttextShadow3RegExp = new RegExp( '(text-shadow\\\\s*:\\\\s*)' + signedQuantPattern, 'gi' ),\n\t\ttranslateXRegExp = new RegExp( '(transform\\\\s*:[^;}]*)(translateX\\\\s*\\\\(\\\\s*)' + signedQuantPattern + '(\\\\s*\\\\))', 'gi' ),\n\t\ttranslateRegExp = new RegExp( '(transform\\\\s*:[^;}]*)(translate\\\\s*\\\\(\\\\s*)' + signedQuantPattern + '((?:\\\\s*,\\\\s*' + signedQuantPattern + '){0,2}\\\\s*\\\\))', 'gi' );\n\n\t/**\n\t * Invert the horizontal value of a background position property.\n\t *\n\t * @private\n\t * @param {string} match Matched property\n\t * @param {string} pre Text before value\n\t * @param {string} value Horizontal value\n\t * @return {string} Inverted property\n\t */\n\tfunction calculateNewBackgroundPosition( match, pre, value ) {\n\t\tvar idx, len;\n\t\tif ( value.slice( -1 ) === '%' ) {\n\t\t\tidx = value.indexOf( '.' );\n\t\t\tif ( idx !== -1 ) {\n\t\t\t\t// Two off, one for the \"%\" at the end, one for the dot itself\n\t\t\t\tlen = value.length - idx - 2;\n\t\t\t\tvalue = 100 - parseFloat( value );\n\t\t\t\tvalue = value.toFixed( len ) + '%';\n\t\t\t} else {\n\t\t\t\tvalue = 100 - parseFloat( value ) + '%';\n\t\t\t}\n\t\t}\n\t\treturn pre + value;\n\t}\n\n\t/**\n\t * Invert a set of border radius values.\n\t *\n\t * @private\n\t * @param {Array} values Matched values\n\t * @return {string} Inverted values\n\t */\n\tfunction flipBorderRadiusValues( values ) {\n\t\tswitch ( values.length ) {\n\t\t\tcase 4:\n\t\t\t\tvalues = [ values[ 1 ], values[ 0 ], values[ 3 ], values[ 2 ] ];\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tvalues = [ values[ 1 ], values[ 0 ], values[ 1 ], values[ 2 ] ];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tvalues = [ values[ 1 ], values[ 0 ] ];\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tvalues = [ values[ 0 ] ];\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn values.join( ' ' );\n\t}\n\n\t/**\n\t * Invert a set of border radius values.\n\t *\n\t * @private\n\t * @param {string} match Matched property\n\t * @param {string} pre Text before value\n\t * @param {string} [firstGroup1]\n\t * @param {string} [firstGroup2]\n\t * @param {string} [firstGroup3]\n\t * @param {string} [firstGroup4]\n\t * @param {string} [secondGroup1]\n\t * @param {string} [secondGroup2]\n\t * @param {string} [secondGroup3]\n\t * @param {string} [secondGroup4]\n\t * @param {string} [post] Text after value\n\t * @return {string} Inverted property\n\t */\n\tfunction calculateNewBorderRadius( match, pre ) {\n\t\tvar values,\n\t\t\targs = [].slice.call( arguments ),\n\t\t\tfirstGroup = args.slice( 2, 6 ).filter( function ( val ) {\n\t\t\t\treturn val;\n\t\t\t} ),\n\t\t\tsecondGroup = args.slice( 6, 10 ).filter( function ( val ) {\n\t\t\t\treturn val;\n\t\t\t} ),\n\t\t\tpost = args[ 10 ] || '';\n\n\t\tif ( secondGroup.length ) {\n\t\t\tvalues = flipBorderRadiusValues( firstGroup ) + ' / ' + flipBorderRadiusValues( secondGroup );\n\t\t} else {\n\t\t\tvalues = flipBorderRadiusValues( firstGroup );\n\t\t}\n\n\t\treturn pre + values + post;\n\t}\n\n\t/**\n\t * Flip the sign of a CSS value, possibly with a unit.\n\t *\n\t * We can't just negate the value with unary minus due to the units.\n\t *\n\t * @private\n\t * @param {string} value\n\t * @return {string}\n\t */\n\tfunction flipSign( value ) {\n\t\tif ( parseFloat( value ) === 0 ) {\n\t\t\t// Don't mangle zeroes\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( value[ 0 ] === '-' ) {\n\t\t\treturn value.slice( 1 );\n\t\t}\n\n\t\treturn '-' + value;\n\t}\n\n\t/**\n\t * @private\n\t * @param {string} match\n\t * @param {string} property\n\t * @param {string} offset\n\t * @return {string}\n\t */\n\tfunction calculateNewShadow( match, property, offset ) {\n\t\treturn property + flipSign( offset );\n\t}\n\n\t/**\n\t * @private\n\t * @param {string} match\n\t * @param {string} property\n\t * @param {string} prefix\n\t * @param {string} offset\n\t * @param {string} suffix\n\t * @return {string}\n\t */\n\tfunction calculateNewTranslate( match, property, prefix, offset, suffix ) {\n\t\treturn property + prefix + flipSign( offset ) + suffix;\n\t}\n\n\t/**\n\t * @private\n\t * @param {string} match\n\t * @param {string} property\n\t * @param {string} color\n\t * @param {string} space\n\t * @param {string} offset\n\t * @return {string}\n\t */\n\tfunction calculateNewFourTextShadow( match, property, color, space, offset ) {\n\t\treturn property + color + space + flipSign( offset );\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Transform a left-to-right stylesheet to right-to-left.\n\t\t *\n\t\t * @param {string} css Stylesheet to transform\n\t\t * @param {Object} options Options\n\t\t * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs\n\t\t * (e.g. 'ltr', 'rtl')\n\t\t * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs\n\t\t * (e.g. 'left', 'right')\n\t\t * @return {string} Transformed stylesheet\n\t\t */\n\t\t'transform': function ( css, options ) { // eslint-disable-line quote-props\n\t\t\t// Use single quotes in this object literal key for closure compiler.\n\t\t\t// Tokenizers\n\t\t\tvar noFlipSingleTokenizer = new Tokenizer( noFlipSingleRegExp, noFlipSingleToken ),\n\t\t\t\tnoFlipClassTokenizer = new Tokenizer( noFlipClassRegExp, noFlipClassToken ),\n\t\t\t\tcommentTokenizer = new Tokenizer( commentRegExp, commentToken );\n\n\t\t\t// Tokenize\n\t\t\tcss = commentTokenizer.tokenize(\n\t\t\t\tnoFlipClassTokenizer.tokenize(\n\t\t\t\t\tnoFlipSingleTokenizer.tokenize(\n\t\t\t\t\t\t// We wrap tokens in ` , not ~ like the original implementation does.\n\t\t\t\t\t\t// This was done because ` is not a legal character in CSS and can only\n\t\t\t\t\t\t// occur in URLs, where we escape it to %60 before inserting our tokens.\n\t\t\t\t\t\tcss.replace( '`', '%60' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Transform URLs\n\t\t\tif ( options.transformDirInUrl ) {\n\t\t\t\t// Replace 'ltr' with 'rtl' and vice versa in background URLs\n\t\t\t\tcss = css\n\t\t\t\t\t.replace( ltrDirSelector, '$1' + temporaryLtrToken + '$2' )\n\t\t\t\t\t.replace( rtlDirSelector, '$1' + temporaryRtlToken + '$2' )\n\t\t\t\t\t.replace( ltrInUrlRegExp, '$1' + temporaryToken )\n\t\t\t\t\t.replace( rtlInUrlRegExp, '$1ltr' )\n\t\t\t\t\t.replace( temporaryTokenRegExp, 'rtl' )\n\t\t\t\t\t.replace( temporaryLtrTokenRegExp, 'ltr' )\n\t\t\t\t\t.replace( temporaryRtlTokenRegExp, 'rtl' );\n\t\t\t}\n\t\t\tif ( options.transformEdgeInUrl ) {\n\t\t\t\t// Replace 'left' with 'right' and vice versa in background URLs\n\t\t\t\tcss = css\n\t\t\t\t\t.replace( leftInUrlRegExp, '$1' + temporaryToken )\n\t\t\t\t\t.replace( rightInUrlRegExp, '$1left' )\n\t\t\t\t\t.replace( temporaryTokenRegExp, 'right' );\n\t\t\t}\n\n\t\t\t// Transform rules\n\t\t\tcss = css\n\t\t\t\t// Replace direction: ltr; with direction: rtl; and vice versa.\n\t\t\t\t.replace( directionLtrRegExp, '$1' + temporaryToken )\n\t\t\t\t.replace( directionRtlRegExp, '$1ltr' )\n\t\t\t\t.replace( temporaryTokenRegExp, 'rtl' )\n\t\t\t\t// Flip rules like left: , padding-right: , etc.\n\t\t\t\t.replace( leftRegExp, '$1' + temporaryToken )\n\t\t\t\t.replace( rightRegExp, '$1left' )\n\t\t\t\t.replace( temporaryTokenRegExp, 'right' )\n\t\t\t\t// Flip East and West in rules like cursor: nw-resize;\n\t\t\t\t.replace( cursorEastRegExp, '$1$2' + temporaryToken )\n\t\t\t\t.replace( cursorWestRegExp, '$1$2e-resize' )\n\t\t\t\t.replace( temporaryTokenRegExp, 'w-resize' )\n\t\t\t\t// Border radius\n\t\t\t\t.replace( borderRadiusRegExp, calculateNewBorderRadius )\n\t\t\t\t// Shadows\n\t\t\t\t.replace( boxShadowRegExp, calculateNewShadow )\n\t\t\t\t.replace( textShadow1RegExp, calculateNewFourTextShadow )\n\t\t\t\t.replace( textShadow2RegExp, calculateNewFourTextShadow )\n\t\t\t\t.replace( textShadow3RegExp, calculateNewShadow )\n\t\t\t\t// Translate\n\t\t\t\t.replace( translateXRegExp, calculateNewTranslate )\n\t\t\t\t.replace( translateRegExp, calculateNewTranslate )\n\t\t\t\t// Swap the second and fourth parts in four-part notation rules\n\t\t\t\t// like padding: 1px 2px 3px 4px;\n\t\t\t\t.replace( fourNotationQuantRegExp, '$1$2$3$8$5$6$7$4$9' )\n\t\t\t\t.replace( fourNotationColorRegExp, '$1$2$3$8$5$6$7$4$9' )\n\t\t\t\t// Flip horizontal background percentages\n\t\t\t\t.replace( bgHorizontalPercentageRegExp, calculateNewBackgroundPosition )\n\t\t\t\t.replace( bgHorizontalPercentageXRegExp, calculateNewBackgroundPosition );\n\n\t\t\t// Detokenize\n\t\t\tcss = noFlipSingleTokenizer.detokenize(\n\t\t\t\tnoFlipClassTokenizer.detokenize(\n\t\t\t\t\tcommentTokenizer.detokenize( css )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn css;\n\t\t}\n\t};\n}\n\n/* Initialization */\n\ncssjanus = new CSSJanus();\n\n/* Exports */\n\nif ( typeof module !== 'undefined' && module.exports ) {\n\t/**\n\t * Transform a left-to-right stylesheet to right-to-left.\n\t *\n\t * This function is a static wrapper around the transform method of an instance of CSSJanus.\n\t *\n\t * @param {string} css Stylesheet to transform\n\t * @param {Object|boolean} [options] Options object, or transformDirInUrl option (back-compat)\n\t * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs\n\t * (e.g. 'ltr', 'rtl')\n\t * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs\n\t * (e.g. 'left', 'right')\n\t * @param {boolean} [transformEdgeInUrl] Back-compat parameter\n\t * @return {string} Transformed stylesheet\n\t */\n\texports.transform = function ( css, options, transformEdgeInUrl ) {\n\t\tvar norm;\n\t\tif ( typeof options === 'object' ) {\n\t\t\tnorm = options;\n\t\t} else {\n\t\t\tnorm = {};\n\t\t\tif ( typeof options === 'boolean' ) {\n\t\t\t\tnorm.transformDirInUrl = options;\n\t\t\t}\n\t\t\tif ( typeof transformEdgeInUrl === 'boolean' ) {\n\t\t\t\tnorm.transformEdgeInUrl = transformEdgeInUrl;\n\t\t\t}\n\t\t}\n\t\treturn cssjanus.transform( css, norm );\n\t};\n} else if ( typeof window !== 'undefined' ) {\n\t/* global window */\n\t// Allow cssjanus to be used in a browser.\n\t// eslint-disable-next-line dot-notation\n\twindow[ 'cssjanus' ] = cssjanus;\n}\n","usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"arrow-parens","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/bench.js","messages":[{"ruleId":"security/detect-non-literal-fs-filename","severity":1,"message":"Found readFileSync from package \"fs\" with non literal argument at index 0","line":84,"column":10,"nodeType":"CallExpression","endLine":84,"endColumn":41},{"ruleId":"security/detect-non-literal-fs-filename","severity":1,"message":"Found writeFileSync from package \"fs\" with non literal argument at index 0","line":99,"column":2,"nodeType":"CallExpression","endLine":99,"endColumn":32},{"ruleId":"n/no-process-exit","severity":1,"message":"Don't use process.exit(); throw an error instead.","line":136,"column":2,"nodeType":"CallExpression","messageId":"noProcessExit","endLine":136,"endColumn":19}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n/* eslint no-process-exit:\"off\" */\n\nconst crypto = require( 'crypto' );\nconst fs = require( 'fs' );\nconst https = require( 'https' );\nconst cssjanus = require( '../' );\n\nconst baseBench = {\n\tname: '',\n\tstarted: NaN,\n\tstart: function ( name ) {\n\t\tthis.name = name;\n\t\tthis.started = process.hrtime();\n\t},\n\tend: function ( ops ) {\n\t\tconst elapsed = process.hrtime( this.started );\n\t\tif ( elapsed[ 0 ] === 0 && elapsed[ 1 ] === 0 ) {\n\t\t\tthrow new Error( 'insufficient clock precision for short benchmark' );\n\t\t}\n\t\tconst time = elapsed[ 0 ] + elapsed[ 1 ] / 1e9;\n\t\tconst rate = ops / time;\n\t\tthis.report( rate, time );\n\t},\n\treport: function ( rate, time ) {\n\t\tconsole.log( 'Bench ' + this.name +\n\t\t\t': ' + rate.toFixed( 0 ) + ' op/s in ' +\n\t\t\ttime.toFixed( 1 ) + 's'\n\t\t);\n\t}\n};\n\nfunction checksum( algorithm, str ) {\n\treturn crypto\n\t\t.createHash( algorithm )\n\t\t.update( str, 'utf8' )\n\t\t.digest( 'hex' );\n}\n\nfunction fetch( url ) {\n\tlet redirects = 0;\n\treturn new Promise( ( resolve, reject ) => {\n\t\thttps.get( url, function handleResponse( res ) {\n\t\t\tlet data = '';\n\t\t\t// Handle redirect\n\t\t\tif ( res.statusCode === 301 || res.statusCode === 302 ) {\n\t\t\t\tif ( !res.headers.location ) {\n\t\t\t\t\treject( new Error( 'Redirect without location' ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tredirects++;\n\t\t\t\tif ( redirects > 1 ) {\n\t\t\t\t\treject( new Error( 'Too many redirects' ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\thttps.get( res.headers.location, handleResponse );\n\t\t\t\tres.resume();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Handle http error\n\t\t\tif ( res.statusCode !== 200 ) {\n\t\t\t\treject( new Error( 'HTTP ' + res.statusCode ) );\n\t\t\t\tres.resume();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tres.setEncoding( 'utf8' );\n\t\t\tres.on( 'data', ( chunk ) => {\n\t\t\t\tdata += chunk;\n\t\t\t} );\n\t\t\tres.on( 'end', () => {\n\t\t\t\tresolve( data );\n\t\t\t} );\n\t\t} ).on( 'error', ( err ) => {\n\t\t\treject( err );\n\t\t} );\n\t} );\n}\n\nasync function getFixture( name, sha1, url ) {\n\tconst file = __dirname + '/fixture.' + name + '.dat';\n\tlet data;\n\n\ttry {\n\t\tdata = fs.readFileSync( file, 'utf8' );\n\t\tif ( checksum( 'sha1', data ) === sha1 ) {\n\t\t\treturn data;\n\t\t}\n\t} catch ( e ) {\n\t\t// Ignore\n\t}\n\n\tdata = await fetch( url );\n\tdata = Buffer.from( data, 'base64' ).toString( 'utf8' );\n\n\tif ( checksum( 'sha1', data ) !== sha1 ) {\n\t\tthrow new Error( 'Checksum mis-match' );\n\t}\n\n\tfs.writeFileSync( file, data );\n\n\treturn data;\n}\n\nasync function benchFixture( fixture ) {\n\tconst data = await getFixture( fixture.name, fixture.sha1, fixture.src );\n\tconst ops = 10_000;\n\tconst bench = Object.create( baseBench );\n\tlet i = ops;\n\tbench.start( fixture.name );\n\twhile ( i-- ) {\n\t\tcssjanus.transform( data );\n\t}\n\tbench.end( ops );\n}\n\nasync function main() {\n\tconst fixtures = [\n\t\t{\n\t\t\tname: 'mediawiki',\n\t\t\tsha1: '6277eb6b3ce25e2abcaa720f5da1b979686ea166',\n\t\t\tsrc: 'https://gerrit.wikimedia.org/g/mediawiki/core/+/10644263276ab941b19d2365e16813bd57e9d1f5/resources/src/mediawiki.legacy/shared.css?format=TEXT'\n\t\t},\n\t\t{\n\t\t\tname: 'ooui',\n\t\t\tsha1: 'b6f7ebc0e26c53617284d3f3a99552f9ffbf85fa',\n\t\t\tsrc: 'https://gerrit.wikimedia.org/g/mediawiki/core/+/130344b47ad939114400d2d0dfbc4018d6d2b5a9/resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css?format=TEXT'\n\t\t}\n\t];\n\tfor ( const fixture of fixtures ) {\n\t\tawait benchFixture( fixture );\n\t}\n}\n\nmain().catch( ( err ) => {\n\tconsole.error( err );\n\tprocess.exit( 1 );\n} );\n","usedDeprecatedRules":[{"ruleId":"arrow-parens","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/data.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"arrow-parens","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/unit.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"arrow-parens","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]}]

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

added 359 packages, and audited 360 packages in 4s

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

found 0 vulnerabilities

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

> cssjanus@2.3.0 test
> eslint . && qunit test/unit.js


/src/repo/src/cssjanus.js
  79:24  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp

/src/repo/test/bench.js
   84:10  warning  Found readFileSync from package "fs" with non literal argument at index 0   security/detect-non-literal-fs-filename
   99:2   warning  Found writeFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  136:2   warning  Don't use process.exit(); throw an error instead                            n/no-process-exit

✖ 4 problems (0 errors, 4 warnings)

TAP version 13
ok 1 preserve comments
ok 2 flip position
ok 3 flip negative values
ok 4 flip four value notation
ok 5 flip direction
ok 6 flip float
ok 7 flip padding
ok 8 flip padding-{edge}
ok 9 flip margin-{edge}
ok 10 flip cursor
ok 11 flip text-align
ok 12 flip text-shadow
ok 13 flip box-shadow
ok 14 flip border-{edge}
ok 15 flip border-{edge}-color
ok 16 flip border-{edge}-style
ok 17 flip border-color
ok 18 flip border-width
ok 19 flip border-style
ok 20 flip border-radius
ok 21 flip border-radius (one-way)
ok 22 flip border-top-{edge}-radius
ok 23 flip border-bottom-{edge}-radius
ok 24 flip transform translate x-axis
ok 25 flip background-position keywords
ok 26 flip background-position percentages
ok 27 do not flip background-position non-percentages
ok 28 flip background percentages
ok 29 flip background-position-x percentages
ok 30 do not flip background-position-y
ok 31 do not flip URLs when url transforms are off
ok 32 flip URLs when url transforms are on
ok 33 do not flip URLs (back-compat boolean argument)
ok 34 flip URLs (back-compat boolean argument)
ok 35 leave class names alone
ok 36 leave unknown properties alone
ok 37 flip multiple rules
ok 38 flip duplicate properties
ok 39 do not flip rules or properties with @noflip comments
ok 40 do not flip gradient notation
ok 41 long content
ok 42 do not touch CSS Logical
ok 43 do not touch dir attribute selector and dir pseudo-class selector
1..43
# pass 43
# skip 0
# todo 0
# fail 0

--- end ---
$ /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": 359,
      "optional": 0,
      "peer": 1,
      "peerOptional": 0,
      "total": 359
    }
  }
}

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

--- end ---
build: Updating eslint-config-wikimedia to 0.29.1

$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmpj2vd6s0_
--- stdout ---
[master cf097e1] build: Updating eslint-config-wikimedia to 0.29.1
 3 files changed, 20 insertions(+), 17 deletions(-)

--- end ---
$ git format-patch HEAD~1 --stdout
--- stdout ---
From cf097e14908619d003f2d3927d228070de378746 Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Sat, 29 Mar 2025 04:43:36 +0000
Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.29.1

Change-Id: Ie041f6bd471cc8af90adc9022aed43565f99bca1
---
 package-lock.json | 33 ++++++++++++++++++---------------
 package.json      |  2 +-
 test/bench.js     |  2 +-
 3 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index e64fb03..eccdaa0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,7 @@
 			"license": "Apache-2.0",
 			"devDependencies": {
 				"eslint": "8.57.0",
-				"eslint-config-wikimedia": "0.28.2",
+				"eslint-config-wikimedia": "0.29.1",
 				"nyc": "^15.1.0",
 				"qunit": "2.24.1"
 			},
@@ -1446,9 +1446,9 @@
 			}
 		},
 		"node_modules/eslint-config-wikimedia": {
-			"version": "0.28.2",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
-			"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
+			"version": "0.29.1",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz",
+			"integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==",
 			"dev": true,
 			"dependencies": {
 				"browserslist-config-wikimedia": "^0.7.0",
@@ -1461,13 +1461,16 @@
 				"eslint-plugin-mediawiki": "^0.7.0",
 				"eslint-plugin-mocha": "^10.4.3",
 				"eslint-plugin-n": "^17.7.0",
-				"eslint-plugin-no-jquery": "^3.0.1",
+				"eslint-plugin-no-jquery": "^3.1.1",
 				"eslint-plugin-qunit": "^8.1.1",
 				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^53.0.0",
 				"eslint-plugin-vue": "^9.26.0",
 				"eslint-plugin-wdio": "^8.24.12",
 				"eslint-plugin-yml": "^1.14.0"
+			},
+			"engines": {
+				"node": ">=18 <23"
 			}
 		},
 		"node_modules/eslint-plugin-compat": {
@@ -1665,9 +1668,9 @@
 			}
 		},
 		"node_modules/eslint-plugin-no-jquery": {
-			"version": "3.0.1",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
-			"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
+			"version": "3.1.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz",
+			"integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==",
 			"dev": true,
 			"peerDependencies": {
 				"eslint": ">=8.0.0"
@@ -5342,9 +5345,9 @@
 			}
 		},
 		"eslint-config-wikimedia": {
-			"version": "0.28.2",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
-			"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
+			"version": "0.29.1",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz",
+			"integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==",
 			"dev": true,
 			"requires": {
 				"browserslist-config-wikimedia": "^0.7.0",
@@ -5357,7 +5360,7 @@
 				"eslint-plugin-mediawiki": "^0.7.0",
 				"eslint-plugin-mocha": "^10.4.3",
 				"eslint-plugin-n": "^17.7.0",
-				"eslint-plugin-no-jquery": "^3.0.1",
+				"eslint-plugin-no-jquery": "^3.1.1",
 				"eslint-plugin-qunit": "^8.1.1",
 				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^53.0.0",
@@ -5492,9 +5495,9 @@
 			}
 		},
 		"eslint-plugin-no-jquery": {
-			"version": "3.0.1",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
-			"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
+			"version": "3.1.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz",
+			"integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==",
 			"dev": true,
 			"requires": {}
 		},
diff --git a/package.json b/package.json
index 7d6f496..45fd2d7 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
 	"dependencies": {},
 	"devDependencies": {
 		"eslint": "8.57.0",
-		"eslint-config-wikimedia": "0.28.2",
+		"eslint-config-wikimedia": "0.29.1",
 		"nyc": "^15.1.0",
 		"qunit": "2.24.1"
 	},
diff --git a/test/bench.js b/test/bench.js
index 813c5db..82a5f5e 100644
--- a/test/bench.js
+++ b/test/bench.js
@@ -93,7 +93,7 @@ async function getFixture( name, sha1, url ) {
 	data = Buffer.from( data, 'base64' ).toString( 'utf8' );
 
 	if ( checksum( 'sha1', data ) !== sha1 ) {
-		return Promise.reject( new Error( 'Checksum mis-match' ) );
+		throw new Error( 'Checksum mis-match' );
 	}
 
 	fs.writeFileSync( file, data );
-- 
2.39.2


--- end ---
Source code is licensed under the AGPL.