diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2862ca33..3c5d8f14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,13 +19,13 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # Custom token to allow commits trigger other workflows. token: ${{ secrets.BUILD_ACTION_GITHUB_TOKEN }} - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 573a3037..a4fd5abd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c0236808..7d9f3d7f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,10 +22,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 6ce4937c..88a1a619 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -28,16 +28,16 @@ jobs: steps: - name: Check out repository (push) if: ${{ github.event_name == 'push' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check out repository (pull_request_target) if: ${{ github.event_name == 'pull_request_target' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0849f0b9..ab045047 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,11 +25,11 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-22.04, windows-latest] steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # ClangFormat @@ -44,7 +44,7 @@ jobs: # Go - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.4 @@ -56,7 +56,7 @@ jobs: # Node.js - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" @@ -92,7 +92,7 @@ jobs: # Python - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 cache: "pip" @@ -114,7 +114,7 @@ jobs: bundler: 2 - name: Set up bundle cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./test/linters/projects/**/vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('./test/linters/projects/**/Gemfile.lock', '.github/workflows/test.yml') }} @@ -136,10 +136,15 @@ jobs: # Swift (only on Linux) + - uses: swift-actions/setup-swift@v2 + if: startsWith(matrix.os, 'ubuntu') + with: + swift-version: "5.5.0" + - name: Set up Swift cache (Linux) id: cache-swift if: startsWith(matrix.os, 'ubuntu') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./swift-format/.build key: ${{ runner.os }}-swift-0.50500.0 @@ -161,7 +166,7 @@ jobs: - name: Set up Mint cache (macOS) if: startsWith(matrix.os, 'macos') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.mint key: ${{ runner.os }}-mint-${{ hashFiles('./test/linters/projects/**/Mintfile', '.github/workflows/test.yml') }} @@ -178,7 +183,7 @@ jobs: mint bootstrap --link --overwrite=y - name: Set up .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: "6.0.x" diff --git a/.nvmrc b/.nvmrc index b6a7d89c..209e3ef4 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +20 diff --git a/README.md b/README.md index e4a08da4..f7100270 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Install your linters here @@ -130,12 +130,12 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 20 # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies @@ -172,7 +172,7 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up PHP uses: shivammathur/setup-php@v2 @@ -211,7 +211,7 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up PHP uses: shivammathur/setup-php@v2 @@ -253,10 +253,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -292,7 +292,7 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install ClangFormat run: sudo apt-get install -y clang-format @@ -325,10 +325,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: "6.0.x" @@ -360,10 +360,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/action.yml b/action.yml index 0bc82a37..a828f3f5 100644 --- a/action.yml +++ b/action.yml @@ -637,7 +637,7 @@ inputs: default: "true" runs: - using: node16 + using: node20 main: ./dist/index.js branding: diff --git a/dist/index.js b/dist/index.js index cf6190a9..ee48381b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9559,8 +9559,8 @@ var os = __nccwpck_require__(2037); var process = __nccwpck_require__(7282); var fs = __nccwpck_require__(7147); var path = __nccwpck_require__(1017); -var util = __nccwpck_require__(3837); var which = __nccwpck_require__(4207); +var util = __nccwpck_require__(3837); function _interopNamespaceDefault(e) { var n = Object.create(null); @@ -9592,25 +9592,24 @@ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path); * representation of that executable. * * To obtain the location of the executable this function (if necessary): - * - Expands the provided string to a absolute path. + * - Expands the provided string to an absolute path. * - Follows symbolic links. * * @param {object} args The arguments for this function. + * @param {object} args.env The environment variables. * @param {string} args.executable A string representation of the executable. * @param {object} deps The dependencies for this function. * @param {Function} deps.exists A function to check if a file exists. * @param {Function} deps.readlink A function to resolve (sym)links. * @param {Function} deps.which A function to perform a `which(1)`-like lookup. * @returns {string} The full path to the binary of the executable. - * @throws {Error} If the `deps` aren't provided. */ -function resolveExecutable({ executable }, { exists, readlink, which }) { - if (readlink === undefined || which === undefined) { - throw new Error(); - } - +function resolveExecutable( + { env, executable }, + { exists, readlink, which }, +) { try { - executable = which(executable); + executable = which(executable, { path: env.PATH || env.Path }); } catch (_) { // For backwards compatibility return the executable even if its location // cannot be obtained @@ -9634,8 +9633,7 @@ function resolveExecutable({ executable }, { exists, readlink, which }) { } /** - * @overview Provides an API to consistently escape or quote shell arguments - * across platforms. + * @overview Provides reflection functionality. * @license MPL-2.0 */ @@ -9664,6 +9662,49 @@ const typeofFunction = "function"; */ const typeofString = "string"; +/** + * Checks if a value can be converted into a string and converts it if possible. + * + * @param {any} value The value of interest. + * @returns {string | null} If possible the string of `value`, otherwise `null`. + */ +function maybeToString(value) { + if (value === undefined || value === null) { + return null; + } + + if (typeof value.toString !== typeofFunction) { + return null; + } + + const maybeStr = value.toString(); + if (isString(maybeStr)) { + return maybeStr; + } else { + return null; + } +} + +/** + * Convert a value into a string if that is possible. + * + * @param {any} value The value to convert into a string. + * @returns {string} The `value` as a string. + * @throws {TypeError} The `value` is not stringable. + */ +function checkedToString(value) { + if (isString(value)) { + return value; + } + + const maybeStr = maybeToString(value); + if (maybeStr === null) { + throw new TypeError(typeError); + } + + return maybeStr; +} + /** * Checks if a value is a string. * @@ -9675,350 +9716,504 @@ function isString(value) { } /** - * Checks if a value can be converted into a string. + * Converts the provided value into an array if it is not already an array and + * returns the array. * - * @param {any} value The value of interest. - * @returns {boolean} `true` if `value` is stringable, `false` otherwise. + * @param {Array | any} value The value to convert to an array if necessary. + * @returns {Array} An array containing `value` or `value` itself. */ -function isStringable(value) { - if (value === undefined || value === null) { - return false; - } +function toArrayIfNecessary(value) { + return Array.isArray(value) ? value : [value]; +} - if (typeof value.toString !== typeofFunction) { - return false; - } +/** + * @overview Provides functionality for parsing shescape options. + * @license MPL-2.0 + */ - const str = value.toString(); - return isString(str); -} /** - * Parses options provided to {@link escapeShellArg} or {@link quoteShellArg}. + * Parses options provided to shescape. * * @param {object} args The arguments for this function. + * @param {object} args.env The environment variables. * @param {object} args.options The options for escaping. - * @param {string} [args.options.shell] The shell to escape for. + * @param {boolean} [args.options.flagProtection] Is flag protection enabled. * @param {boolean} [args.options.interpolation] Is interpolation enabled. - * @param {object} args.process The `process` values. - * @param {object} args.process.env The environment variables. + * @param {boolean | string} [args.options.shell] The shell to escape for. * @param {object} deps The dependencies for this function. - * @param {Function} deps.getDefaultShell Get the default shell for the system. - * @param {Function} deps.getShellName Get the name of a shell. + * @param {Function} deps.getDefaultShell Function to get the default shell. + * @param {Function} deps.getShellName Function to get the name of a shell. * @returns {object} The parsed arguments. */ function parseOptions( - { options: { interpolation, shell }, process: { env } }, - { getDefaultShell, getShellName } + { env, options: { flagProtection, interpolation, shell } }, + { getDefaultShell, getShellName }, ) { + flagProtection = flagProtection ? true : false; interpolation = interpolation ? true : false; shell = isString(shell) ? shell : getDefaultShell({ env }); - const shellName = getShellName({ shell }, { resolveExecutable }); - return { interpolation, shellName }; + const shellName = getShellName({ env, shell }, { resolveExecutable }); + return { flagProtection, interpolation, shellName }; } /** - * Escapes an argument for the given shell. + * @overview Provides functionality for the Bourne-again shell (Bash). + * @license MPL-2.0 + */ + +/** + * Escape an argument for use in Bash when interpolation is active. * - * @param {object} args The arguments for this function. - * @param {string} args.arg The argument to escape. - * @param {boolean} args.interpolation Is interpolation enabled. - * @param {boolean} args.quoted Is `arg` being quoted. - * @param {string} args.shellName The name of the shell to escape `arg` for. - * @param {object} deps The dependencies for this function. - * @param {Function} deps.getEscapeFunction Get the escape function for a shell. + * @param {string} arg The argument to escape. * @returns {string} The escaped argument. - * @throws {TypeError} The argument to escape is not stringable. */ -function escape$1( - { arg, interpolation, quoted, shellName }, - { getEscapeFunction } -) { - if (!isStringable(arg)) { - throw new TypeError(typeError); - } +function escapeArgForInterpolation$5(arg) { + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/\\/gu, "\\\\") + .replace(/(?<=^|\s)([#~])/gu, "\\$1") + .replace(/(["$&'()*;<>?`{|])/gu, "\\$1") + .replace(/(?<=[:=])(~)(?=[\s+\-/0:=]|$)/gu, "\\$1") + .replace(/([\t ])/gu, "\\$1"); +} - const argAsString = arg.toString(); - const escape = getEscapeFunction(shellName); - const escapedArg = escape(argAsString, { interpolation, quoted }); - return escapedArg; +/** + * Escape an argument for use in Bash when the argument is not being quoted (but + * interpolation is inactive). + * + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. + */ +function escapeArgForNoInterpolation$5(arg) { + return arg.replace(/[\0\u0008\u001B\u009B]/gu, "").replace(/\r(?!\n)/gu, ""); } /** - * Quotes and escape an argument for the given shell. + * Returns a function to escape arguments for use in Bash for the given use + * case. * - * @param {object} args The arguments for this function. - * @param {string} args.arg The argument to escape. - * @param {string} args.shellName The name of the shell to escape `arg` for. - * @param {object} deps The dependencies for this function. - * @param {Function} deps.getEscapeFunction Get the escape function for a shell. - * @param {Function} deps.getQuoteFunction Get the quote function for a shell. - * @returns {string} The quoted and escaped argument. - * @throws {TypeError} The argument to escape is not stringable. + * @param {object} options The options for escaping arguments. + * @param {boolean} options.interpolation Is interpolation enabled. + * @returns {Function} A function to escape arguments. */ -function quote$1({ arg, shellName }, { getEscapeFunction, getQuoteFunction }) { - const escapedArg = escape$1( - { arg, interpolation: false, quoted: true, shellName }, - { getEscapeFunction } - ); - const quote = getQuoteFunction(shellName); - const escapedAndQuotedArg = quote(escapedArg); - return escapedAndQuotedArg; +function getEscapeFunction$7(options) { + if (options.interpolation) { + return escapeArgForInterpolation$5; + } else { + return escapeArgForNoInterpolation$5; + } } /** - * Escapes an argument for the given shell. + * Escape an argument for use in Bash when the argument is being quoted. * - * @param {object} args The arguments for this function. - * @param {string} args.arg The argument to escape. - * @param {object} args.options The options for escaping `arg`. - * @param {boolean} [args.options.interpolation] Is interpolation enabled. - * @param {string} [args.options.shell] The shell to escape `arg` for. - * @param {object} args.process The `process` values. - * @param {object} args.process.env The environment variables. - * @param {object} deps The dependencies for this function. - * @param {Function} deps.getDefaultShell Get the default shell for the system. - * @param {Function} deps.getEscapeFunction Get an escape function for a shell. - * @param {Function} deps.getShellName Get the name of a shell. + * @param {string} arg The argument to escape. * @returns {string} The escaped argument. */ -function escapeShellArg( - { arg, options: { interpolation, shell }, process: { env } }, - { getDefaultShell, getEscapeFunction, getShellName } -) { - const options = parseOptions( - { options: { interpolation, shell }, process: { env } }, - { getDefaultShell, getShellName } - ); - return escape$1( - { - arg, - interpolation: options.interpolation, - quoted: false, - shellName: options.shellName, - }, - { getEscapeFunction } - ); +function escapeArgForQuoted$5(arg) { + return arg + .replace(/[\0\u0008\u001B\u009B]/gu, "") + .replace(/\r(?!\n)/gu, "") + .replace(/'/gu, "'\\''"); } /** - * Quotes and escape an argument for the given shell. + * Quotes an argument for use in Bash. * - * @param {object} args The arguments for this function. - * @param {string} args.arg The argument to escape. - * @param {object} args.options The options for escaping `arg`. - * @param {string} [args.options.shell] The shell to escape `arg` for. - * @param {object} args.process The `process` values. - * @param {object} args.process.env The environment variables. - * @param {object} deps The dependencies for this function. - * @param {Function} deps.getDefaultShell Get the default shell for the system. - * @param {Function} deps.getEscapeFunction Get an escape function for a shell. - * @param {Function} deps.getQuoteFunction Get a quote function for a shell. - * @param {Function} deps.getShellName Get the name of a shell. - * @returns {string} The quoted and escaped argument. + * @param {string} arg The argument to quote. + * @returns {string} The quoted argument. */ -function quoteShellArg( - { arg, options: { shell }, process: { env } }, - { getDefaultShell, getEscapeFunction, getQuoteFunction, getShellName } -) { - const options = parseOptions( - { options: { shell }, process: { env } }, - { getDefaultShell, getShellName } - ); - return quote$1( - { arg, shellName: options.shellName }, - { getEscapeFunction, getQuoteFunction } - ); +function quoteArg$5(arg) { + return `'${arg}'`; } /** - * @overview Provides functionality specifically for Unix systems. - * @license MPL-2.0 + * Returns a pair of functions to escape and quote arguments for use in Bash. + * + * @returns {Function[]} A function pair to escape & quote arguments. */ +function getQuoteFunction$7() { + return [escapeArgForQuoted$5, quoteArg$5]; +} /** - * The name of the Bourne-again shell (Bash) binary. + * Remove any prefix from the provided argument that might be interpreted as a + * flag on Unix systems for Bash. * - * @constant - * @type {string} + * @param {string} arg The argument to update. + * @returns {string} The updated argument. */ -const binBash = "bash"; +function stripFlagPrefix$5(arg) { + return arg.replace(/^-+/gu, ""); +} /** - * The name of the C shell (csh) binary. + * Returns a function to protect against flag injection for Bash. * - * @constant - * @type {string} + * @returns {Function} A function to protect against flag injection. */ -const binCsh = "csh"; +function getFlagProtectionFunction$7() { + return stripFlagPrefix$5; +} /** - * The name of the Debian Almquist shell (Dash) binary. - * - * @constant - * @type {string} + * @overview Provides functionality for the C shell (csh). + * @license MPL-2.0 */ -const binDash = "dash"; + /** - * The name of the Z shell (Zsh) binary. + * Escape an argument for use in csh when interpolation is active. * - * @constant - * @type {string} + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. */ -const binZsh = "zsh"; +function escapeArgForInterpolation$4(arg) { + const textEncoder = new util.TextEncoder(); + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/\\/gu, "\\\\") + .replace(/(?<=^|\s)(~)/gu, "\\$1") + .replace(/!(?!$)/gu, "\\!") + .replace(/(["#$&'()*;<>?[`{|])/gu, "\\$1") + .replace(/([\t ])/gu, "\\$1") + .split("") + .map( + // Due to a bug in C shell version 20110502-7, when a character whose + // utf-8 encoding includes the bytes 0xA0 (160 in decimal) appears in + // an argument after an escaped character, it will hang and endlessly + // consume memory unless the character is escaped with quotes. + // ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995013 + (char) => (textEncoder.encode(char).includes(160) ? `'${char}'` : char), + ) + .join(""); +} /** - * Escapes a shell argument for use in Bash(-like shells). + * Escape an argument for use in csh when the argument is not being quoted (but + * interpolation is inactive). * * @param {string} arg The argument to escape. - * @param {object} options The escape options. - * @param {boolean} options.interpolation Is interpolation enabled. - * @param {boolean} options.quoted Is `arg` being quoted. * @returns {string} The escaped argument. */ -function escapeArgBash(arg, { interpolation, quoted }) { - let result = arg - .replace(/[\0\u0008\u001B\u009B]/gu, "") - .replace(/\r(?!\n)/gu, ""); +function escapeArgForNoInterpolation$4(arg) { + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/\\!$/gu, "\\\\!") + .replace(/!(?!$)/gu, "\\!"); +} - if (interpolation) { - result = result - .replace(/\\/gu, "\\\\") - .replace(/\r?\n/gu, " ") - .replace(/(^|\s)([#~])/gu, "$1\\$2") - .replace(/(["$&'()*;<>?`{|])/gu, "\\$1") - .replace(/(?<=[:=])(~)(?=[\s+\-/0:=]|$)/gu, "\\$1") - .replace(/([\t ])/gu, "\\$1"); - } else if (quoted) { - result = result.replace(/'/gu, `'\\''`); +/** + * Returns a function to escape arguments for use in csh for the given use case. + * + * @param {object} options The options for escaping arguments. + * @param {boolean} options.interpolation Is interpolation enabled. + * @returns {Function} A function to escape arguments. + */ +function getEscapeFunction$6(options) { + if (options.interpolation) { + return escapeArgForInterpolation$4; + } else { + return escapeArgForNoInterpolation$4; } - - return result; } /** - * Escapes a shell argument for use in csh. + * Escape an argument for use in csh when the argument is being quoted. * * @param {string} arg The argument to escape. - * @param {object} options The escape options. - * @param {boolean} options.interpolation Is interpolation enabled. - * @param {boolean} options.quoted Is `arg` being quoted. * @returns {string} The escaped argument. */ -function escapeArgCsh(arg, { interpolation, quoted }) { - let result = arg - .replace(/[\0\u0008\u001B\u009B]/gu, "") - .replace(/\r?\n|\r/gu, " "); - - if (interpolation) { - result = result - .replace(/\\/gu, "\\\\") - .replace(/(^|\s)(~)/gu, "$1\\$2") - .replace(/(["#$&'()*;<>?[`{|])/gu, "\\$1") - .replace(/([\t ])/gu, "\\$1"); - - const textEncoder = new util.TextEncoder(); - result = result - .split("") - .map( - // Due to a bug in C shell version 20110502-7, when a character whose - // utf-8 encoding includes the bytes 0xA0 (160 in decimal) appears in - // an argument after an escaped character, it will hang and endlessly - // consume memory unless the character is escaped with quotes. - // ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995013 - (char) => (textEncoder.encode(char).includes(160) ? `'${char}'` : char) - ) - .join(""); - } else { - result = result.replace(/\\!$/gu, "\\\\!"); - if (quoted) { - result = result.replace(/'/gu, `'\\''`); - } - } +function escapeArgForQuoted$4(arg) { + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/'/gu, "'\\''") + .replace(/\\!$/gu, "\\\\!") + .replace(/!(?!$)/gu, "\\!"); +} - result = result.replace(/!(?!$)/gu, "\\!"); +/** + * Quotes an argument for use in csh. + * + * @param {string} arg The argument to quote. + * @returns {string} The quoted argument. + */ +function quoteArg$4(arg) { + return `'${arg}'`; +} - return result; +/** + * Returns a pair of functions to escape and quote arguments for use in csh. + * + * @returns {Function[]} A function pair to escape & quote arguments. + */ +function getQuoteFunction$6() { + return [escapeArgForQuoted$4, quoteArg$4]; +} + +/** + * Remove any prefix from the provided argument that might be interpreted as a + * flag on Unix systems for csh. + * + * @param {string} arg The argument to update. + * @returns {string} The updated argument. + */ +function stripFlagPrefix$4(arg) { + return arg.replace(/^-+/gu, ""); } /** - * Escapes a shell argument for use in Dash. + * Returns a function to protect against flag injection for csh. + * + * @returns {Function} A function to protect against flag injection. + */ +function getFlagProtectionFunction$6() { + return stripFlagPrefix$4; +} + +/** + * @overview Provides functionality for the Debian Almquist shell (Dash). + * @license MPL-2.0 + */ + +/** + * Escape an argument for use in Dash when interpolation is active. * * @param {string} arg The argument to escape. - * @param {object} options The escape options. + * @returns {string} The escaped argument. + */ +function escapeArgForInterpolation$3(arg) { + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/\\/gu, "\\\\") + .replace(/(?<=^|\s)([#~])/gu, "\\$1") + .replace(/(["$&'()*;<>?`|])/gu, "\\$1") + .replace(/([\t ])/gu, "\\$1"); +} + +/** + * Escape an argument for use in Dash when the argument is not being quoted (but + * interpolation is inactive). + * + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. + */ +function escapeArgForNoInterpolation$3(arg) { + return arg.replace(/[\0\u0008\u001B\u009B]/gu, "").replace(/\r(?!\n)/gu, ""); +} + +/** + * Returns a function to escape arguments for use in Dash for the given use + * case. + * + * @param {object} options The options for escaping arguments. * @param {boolean} options.interpolation Is interpolation enabled. - * @param {boolean} options.quoted Is `arg` being quoted. + * @returns {Function} A function to escape arguments. + */ +function getEscapeFunction$5(options) { + if (options.interpolation) { + return escapeArgForInterpolation$3; + } else { + return escapeArgForNoInterpolation$3; + } +} + +/** + * Escape an argument for use in Dash when the argument is being quoted. + * + * @param {string} arg The argument to escape. * @returns {string} The escaped argument. */ -function escapeArgDash(arg, { interpolation, quoted }) { - let result = arg +function escapeArgForQuoted$3(arg) { + return arg .replace(/[\0\u0008\u001B\u009B]/gu, "") - .replace(/\r(?!\n)/gu, ""); + .replace(/\r(?!\n)/gu, "") + .replace(/'/gu, "'\\''"); +} - if (interpolation) { - result = result - .replace(/\\/gu, "\\\\") - .replace(/\r?\n/gu, " ") - .replace(/(^|\s)([#~])/gu, "$1\\$2") - .replace(/(["$&'()*;<>?`|])/gu, "\\$1") - .replace(/([\t\n ])/gu, "\\$1"); - } else if (quoted) { - result = result.replace(/'/gu, `'\\''`); - } +/** + * Quotes an argument for use in Dash. + * + * @param {string} arg The argument to quote. + * @returns {string} The quoted argument. + */ +function quoteArg$3(arg) { + return `'${arg}'`; +} - return result; +/** + * Returns a pair of functions to escape and quote arguments for use in Dash. + * + * @returns {Function[]} A function pair to escape & quote arguments. + */ +function getQuoteFunction$5() { + return [escapeArgForQuoted$3, quoteArg$3]; +} + +/** + * Remove any prefix from the provided argument that might be interpreted as a + * flag on Unix systems for Dash. + * + * @param {string} arg The argument to update. + * @returns {string} The updated argument. + */ +function stripFlagPrefix$3(arg) { + return arg.replace(/^-+/gu, ""); +} + +/** + * Returns a function to protect against flag injection for Dash. + * + * @returns {Function} A function to protect against flag injection. + */ +function getFlagProtectionFunction$5() { + return stripFlagPrefix$3; } /** - * Escapes a shell argument for use in Zsh. + * @overview Provides functionality for the Z shell (Zsh). + * @license MPL-2.0 + */ + +/** + * Escape an argument for use in Zsh when interpolation is active. * * @param {string} arg The argument to escape. - * @param {object} options The escape options. - * @param {boolean} options.interpolation Is interpolation enabled. - * @param {boolean} options.quoted Is `arg` being quoted. * @returns {string} The escaped argument. */ -function escapeArgZsh(arg, { interpolation, quoted }) { - let result = arg - .replace(/[\0\u0008\u001B\u009B]/gu, "") - .replace(/\r(?!\n)/gu, ""); +function escapeArgForInterpolation$2(arg) { + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/\\/gu, "\\\\") + .replace(/(?<=^|\s)([#=~])/gu, "\\$1") + .replace(/(["$&'()*;<>?[\]`{|}])/gu, "\\$1") + .replace(/([\t ])/gu, "\\$1"); +} - if (interpolation) { - result = result - .replace(/\\/gu, "\\\\") - .replace(/\r?\n/gu, " ") - .replace(/(^|\s)([#=~])/gu, "$1\\$2") - .replace(/(["$&'()*;<>?[\]`{|}])/gu, "\\$1") - .replace(/([\t ])/gu, "\\$1"); - } else if (quoted) { - result = result.replace(/'/gu, `'\\''`); +/** + * Escape an argument for use in Zsh when the argument is not being quoted (but + * interpolation is inactive). + * + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. + */ +function escapeArgForNoInterpolation$2(arg) { + return arg.replace(/[\0\u0008\u001B\u009B]/gu, "").replace(/\r(?!\n)/gu, ""); +} + +/** + * Returns a function to escape arguments for use in Zsh for the given use case. + * + * @param {object} options The options for escaping arguments. + * @param {boolean} options.interpolation Is interpolation enabled. + * @returns {Function} A function to escape arguments. + */ +function getEscapeFunction$4(options) { + if (options.interpolation) { + return escapeArgForInterpolation$2; + } else { + return escapeArgForNoInterpolation$2; } +} - return result; +/** + * Escape an argument for use in Zsh when the argument is being quoted. + * + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. + */ +function escapeArgForQuoted$2(arg) { + return arg + .replace(/[\0\u0008\u001B\u009B]/gu, "") + .replace(/\r(?!\n)/gu, "") + .replace(/'/gu, "'\\''"); } /** - * Quotes an argument for use in a Unix shell. + * Quotes an argument for use in Zsh. * * @param {string} arg The argument to quote. * @returns {string} The quoted argument. */ -function quoteArg$1(arg) { +function quoteArg$2(arg) { return `'${arg}'`; } /** - * Returns the basename of a directory or file path on a Unix system. + * Returns a pair of functions to escape and quote arguments for use in Zsh. + * + * @returns {Function[]} A function pair to escape & quote arguments. + */ +function getQuoteFunction$4() { + return [escapeArgForQuoted$2, quoteArg$2]; +} + +/** + * Remove any prefix from the provided argument that might be interpreted as a + * flag on Unix systems for Zsh. + * + * @param {string} arg The argument to update. + * @returns {string} The updated argument. + */ +function stripFlagPrefix$2(arg) { + return arg.replace(/^-+/gu, ""); +} + +/** + * Returns a function to protect against flag injection for Zsh. * - * @param {string} fullPath A Unix-style directory or file path. - * @returns {string} The basename of `fullPath`. + * @returns {Function} A function to protect against flag injection. */ -function getBasename$1(fullPath) { - return path__namespace.basename(fullPath); +function getFlagProtectionFunction$4() { + return stripFlagPrefix$2; } +/** + * @overview Provides functionality for Unix systems. + * @license MPL-2.0 + */ + + +/** + * The name of the Bourne-again shell (Bash) binary. + * + * @constant + * @type {string} + */ +const binBash = "bash"; + +/** + * The name of the C shell (csh) binary. + * + * @constant + * @type {string} + */ +const binCsh = "csh"; + +/** + * The name of the Debian Almquist shell (Dash) binary. + * + * @constant + * @type {string} + */ +const binDash = "dash"; + +/** + * The name of the Z shell (Zsh) binary. + * + * @constant + * @type {string} + */ +const binZsh = "zsh"; + /** * Returns the default shell for Unix systems. * @@ -10035,38 +10230,59 @@ function getDefaultShell$1() { * Returns a function to escape arguments for use in a particular shell. * * @param {string} shellName The name of a Unix shell. - * @returns {Function?} A function to escape arguments for use in the shell. + * @param {object} options The options for escaping arguments. + * @param {boolean} options.interpolation Is interpolation enabled. + * @returns {Function | undefined} A function to escape arguments. */ -function getEscapeFunction$1(shellName) { +function getEscapeFunction$3(shellName, options) { switch (shellName) { case binBash: - return escapeArgBash; + return getEscapeFunction$7(options); case binCsh: - return escapeArgCsh; + return getEscapeFunction$6(options); case binDash: - return escapeArgDash; + return getEscapeFunction$5(options); case binZsh: - return escapeArgZsh; - default: - return null; + return getEscapeFunction$4(options); } } /** - * Returns a function to quote arguments for use in a particular shell. + * Returns a pair of functions to escape and quote arguments for use in a + * particular shell. * * @param {string} shellName The name of a Unix shell. - * @returns {Function?} A function to quote arguments for use in the shell. + * @returns {Function[] | undefined} A function pair to escape & quote arguments. */ -function getQuoteFunction$1(shellName) { +function getQuoteFunction$3(shellName) { switch (shellName) { case binBash: + return getQuoteFunction$7(); case binCsh: + return getQuoteFunction$6(); case binDash: + return getQuoteFunction$5(); case binZsh: - return quoteArg$1; - default: - return null; + return getQuoteFunction$4(); + } +} + +/** + * Returns a function to protect against flag injection. + * + * @param {string} shellName The name of a Unix shell. + * @returns {Function | undefined} A function to protect against flag injection. + */ +function getFlagProtectionFunction$3(shellName) { + switch (shellName) { + case binBash: + return getFlagProtectionFunction$7(); + case binCsh: + return getFlagProtectionFunction$6(); + case binDash: + return getFlagProtectionFunction$5(); + case binZsh: + return getFlagProtectionFunction$4(); } } @@ -10074,19 +10290,20 @@ function getQuoteFunction$1(shellName) { * Determines the name of the shell identified by a file path or file name. * * @param {object} args The arguments for this function. + * @param {object} args.env The environment variables. * @param {string} args.shell The name or path of the shell. * @param {object} deps The dependencies for this function. * @param {Function} deps.resolveExecutable Resolve the path to an executable. * @returns {string} The shell name. */ -function getShellName$1({ shell }, { resolveExecutable }) { +function getShellName$1({ env, shell }, { resolveExecutable }) { shell = resolveExecutable( - { executable: shell }, - { exists: fs__namespace.existsSync, readlink: fs__namespace.readlinkSync, which: which.sync } + { env, executable: shell }, + { exists: fs__namespace.existsSync, readlink: fs__namespace.readlinkSync, which: which.sync }, ); - const shellName = getBasename$1(shell); - if (getEscapeFunction$1(shellName) === null) { + const shellName = path__namespace.basename(shell); + if (getEscapeFunction$3(shellName, {}) === undefined) { return binBash; } @@ -10096,105 +10313,272 @@ function getShellName$1({ shell }, { resolveExecutable }) { var unix = /*#__PURE__*/Object.freeze({ __proto__: null, getDefaultShell: getDefaultShell$1, - getEscapeFunction: getEscapeFunction$1, - getQuoteFunction: getQuoteFunction$1, + getEscapeFunction: getEscapeFunction$3, + getFlagProtectionFunction: getFlagProtectionFunction$3, + getQuoteFunction: getQuoteFunction$3, getShellName: getShellName$1 }); /** - * @overview Provides functionality specifically for Windows systems. + * @overview Provides functionality for the Windows Command Prompt. * @license MPL-2.0 */ /** - * The name of the Windows Command Prompt binary. + * Escape an argument for use in CMD when interpolation is active. * - * @constant - * @type {string} + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. */ -const binCmd = "cmd.exe"; +function escapeArgForInterpolation$1(arg) { + let shouldEscapeSpecialChar = true; + return arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/(? { + if (char === '"') { + shouldEscapeSpecialChar = !shouldEscapeSpecialChar; + } else if (shouldEscapeSpecialChar && /[%&<>^|]/u.test(char)) { + return `^${char}`; + } + + return char; + }, + ) + .join(""); +} /** - * The name of the Windows PowerShell binary. + * Escape an argument for use in CMD when the argument is not being quoted (but + * interpolation is inactive). * - * @constant - * @type {string} + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. */ -const binPowerShell = "powershell.exe"; +function escapeArgForNoInterpolation$1(arg) { + return arg.replace(/[\0\u0008\r\u001B\u009B]/gu, "").replace(/\n/gu, " "); +} /** - * Escapes a shell argument for use in Windows Command Prompt. + * Returns a function to escape arguments for use in CMD for the given use case. * - * @param {string} arg The argument to escape. - * @param {object} options The escape options. + * @param {object} options The options for escaping arguments. * @param {boolean} options.interpolation Is interpolation enabled. - * @param {boolean} options.quoted Is `arg` being quoted. + * @returns {Function} A function to escape arguments. + */ +function getEscapeFunction$2(options) { + if (options.interpolation) { + return escapeArgForInterpolation$1; + } else { + return escapeArgForNoInterpolation$1; + } +} + +/** + * Escape an argument for use in CMD when the argument is being quoted. + * + * @param {string} arg The argument to escape. * @returns {string} The escaped argument. */ -function escapeArgCmd(arg, { interpolation, quoted }) { - let result = arg - .replace(/[\0\u0008\u001B\u009B]/gu, "") - .replace(/\r?\n|\r/gu, " "); +function escapeArgForQuoted$1(arg) { + return escapeArgForInterpolation$1(arg).replace( + /(?|])/gu, "^$1"); - } else if (quoted) { - result = result.replace(/"/gu, `""`); +/** + * Quotes an argument for use in CMD. + * + * @param {string} arg The argument to quote. + * @returns {string} The quoted argument. + */ +function quoteArg$1(arg) { + return arg.replace(/([\t ]+)/gu, '"$1"'); +} + +/** + * Returns a pair of functions to escape and quote arguments for use in CMD. + * + * @returns {Function[]} A function pair to escape & quote arguments. + */ +function getQuoteFunction$2() { + return [escapeArgForQuoted$1, quoteArg$1]; +} + +/** + * Remove any prefix from the provided argument that might be interpreted as a + * flag on Windows systems for CMD. + * + * @param {string} arg The argument to update. + * @returns {string} The updated argument. + */ +function stripFlagPrefix$1(arg) { + return arg.replace(/^(?:-+|\/+)/gu, ""); +} + +/** + * Returns a function to protect against flag injection for CMD. + * + * @returns {Function} A function to protect against flag injection. + */ +function getFlagProtectionFunction$2() { + return stripFlagPrefix$1; +} + +/** + * @overview Provides functionality for Windows PowerShell. + * @license MPL-2.0 + */ + +/** + * Escape an argument for use in PowerShell when interpolation is active. + * + * @param {string} arg The argument to escape. + * @returns {string} The escaped argument. + */ +function escapeArgForInterpolation(arg) { + arg = arg + .replace(/[\0\u0008\r\u001B\u009B]/gu, "") + .replace(/\n/gu, " ") + .replace(/`/gu, "``") + .replace(/(?<=^|[\s\u0085])([*1-6]?)(>)/gu, "$1`$2") + .replace(/(?<=^|[\s\u0085])([#\-:<@\]])/gu, "`$1") + .replace(/([$&'(),;{|}‘’‚‛“”„])/gu, "`$1"); + + if (/[\s\u0085]/u.test(arg.replace(/^[\s\u0085]+/gu, ""))) { + arg = arg + .replace(/(?)/gu, "$1$2`$3") - .replace(/(^|[\s\u0085])([#\-:<@\]])/gu, "$1`$2") - .replace(/(["&'(),;{|}‘’‚‛“”„])/gu, "`$1") - .replace(/([\s\u0085])/gu, "`$1"); - } else if (quoted) { - result = result.replace(/(["“”„])/gu, "$1$1"); + if (/[\s\u0085]/u.test(arg)) { + arg = arg + .replace(/(? { "use strict"; -module.exports = JSON.parse('{"name":"lint-action","version":"2.3.0","description":"GitHub Action for detecting and fixing linting errors","repository":"github:wearerequired/lint-action","license":"MIT","private":true,"main":"./dist/index.js","scripts":{"test":"jest","lint":"eslint --max-warnings 0 \\"**/*.js\\"","lint:fix":"yarn lint --fix","format":"prettier --list-different \\"**/*.{css,html,js,json,jsx,less,md,scss,ts,tsx,vue,yaml,yml}\\"","format:fix":"yarn format --write","build":"ncc build ./src/index.js"},"dependencies":{"@actions/core":"^1.10.0","command-exists":"^1.2.9","glob":"^8.1.0","parse-diff":"^0.11.0","shescape":"^1.6.4"},"peerDependencies":{},"devDependencies":{"@samuelmeuli/eslint-config":"^6.0.0","@samuelmeuli/prettier-config":"^2.0.1","@vercel/ncc":"^0.36.0","eslint":"8.32.0","eslint-config-airbnb-base":"15.0.0","eslint-config-prettier":"^8.6.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsdoc":"^39.6.7","fs-extra":"^11.1.0","jest":"^29.3.1","prettier":"^2.8.3"},"eslintConfig":{"root":true,"extends":["@samuelmeuli/eslint-config","plugin:jsdoc/recommended"],"env":{"node":true,"jest":true},"settings":{"jsdoc":{"mode":"typescript"}},"rules":{"no-await-in-loop":"off","no-unused-vars":["error",{"args":"none","varsIgnorePattern":"^_"}],"jsdoc/check-indentation":"error","jsdoc/check-syntax":"error","jsdoc/newline-after-description":["error","never"],"jsdoc/require-description":"error","jsdoc/require-hyphen-before-param-description":"error","jsdoc/require-jsdoc":"off"}},"eslintIgnore":["node_modules/","test/linters/projects/","test/tmp/","dist/"],"jest":{"setupFiles":["./test/mock-actions-core.js"]},"prettier":"@samuelmeuli/prettier-config"}'); +module.exports = JSON.parse('{"name":"lint-action","version":"2.3.0","description":"GitHub Action for detecting and fixing linting errors","repository":"github:wearerequired/lint-action","license":"MIT","private":true,"main":"./dist/index.js","scripts":{"test":"jest","lint":"eslint --max-warnings 0 \\"**/*.js\\"","lint:fix":"yarn lint --fix","format":"prettier --list-different \\"**/*.{css,html,js,json,jsx,less,md,scss,ts,tsx,vue,yaml,yml}\\"","format:fix":"yarn format --write","build":"ncc build ./src/index.js"},"dependencies":{"@actions/core":"^1.10.0","command-exists":"^1.2.9","glob":"^8.1.0","parse-diff":"^0.11.0","shescape":"^1.7.4"},"peerDependencies":{},"devDependencies":{"@samuelmeuli/eslint-config":"^6.0.0","@samuelmeuli/prettier-config":"^2.0.1","@vercel/ncc":"^0.36.0","eslint":"8.32.0","eslint-config-airbnb-base":"15.0.0","eslint-config-prettier":"^8.6.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsdoc":"^43.*","fs-extra":"^11.1.0","jest":"^29.3.1","prettier":"^2.8.3"},"eslintConfig":{"root":true,"extends":["@samuelmeuli/eslint-config","plugin:jsdoc/recommended"],"env":{"node":true,"jest":true},"settings":{"jsdoc":{"mode":"typescript"}},"rules":{"no-await-in-loop":"off","no-unused-vars":["error",{"args":"none","varsIgnorePattern":"^_"}],"jsdoc/check-indentation":"error","jsdoc/check-syntax":"error","jsdoc/newline-after-description":["error","never"],"jsdoc/require-description":"error","jsdoc/require-hyphen-before-param-description":"error","jsdoc/require-jsdoc":"off"}},"eslintIgnore":["node_modules/","test/linters/projects/","test/tmp/","dist/"],"jest":{"setupFiles":["./test/mock-actions-core.js"]},"prettier":"@samuelmeuli/prettier-config"}'); /***/ }) diff --git a/package.json b/package.json index e595327a..527c56e4 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "command-exists": "^1.2.9", "glob": "^8.1.0", "parse-diff": "^0.11.0", - "shescape": "^1.6.4" + "shescape": "^1.7.4" }, "peerDependencies": {}, "devDependencies": { @@ -30,7 +30,7 @@ "eslint-config-airbnb-base": "15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsdoc": "^39.6.7", + "eslint-plugin-jsdoc": "^43.2.0", "fs-extra": "^11.1.0", "jest": "^29.3.1", "prettier": "^2.8.3" @@ -61,10 +61,6 @@ ], "jsdoc/check-indentation": "error", "jsdoc/check-syntax": "error", - "jsdoc/newline-after-description": [ - "error", - "never" - ], "jsdoc/require-description": "error", "jsdoc/require-hyphen-before-param-description": "error", "jsdoc/require-jsdoc": "off" diff --git a/test/linters/projects/erblint/Gemfile b/test/linters/projects/erblint/Gemfile index e0f59c41..4d2b1c16 100644 --- a/test/linters/projects/erblint/Gemfile +++ b/test/linters/projects/erblint/Gemfile @@ -3,4 +3,4 @@ source 'https://rubygems.org' gem 'rubocop', '~> 1.12.0' -gem 'erb_lint', '~> 0.1.1', require: false +gem 'erb_lint', '~> 0.2.0', require: false diff --git a/test/linters/projects/erblint/Gemfile.lock b/test/linters/projects/erblint/Gemfile.lock index bd39e273..ccc7fd29 100644 --- a/test/linters/projects/erblint/Gemfile.lock +++ b/test/linters/projects/erblint/Gemfile.lock @@ -1,58 +1,67 @@ GEM remote: https://rubygems.org/ specs: - actionview (7.0.4.1) - activesupport (= 7.0.4.1) + actionview (7.1.3.4) + activesupport (= 7.1.3.4) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activesupport (7.0.4.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activesupport (7.1.3.4) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) ast (2.4.2) - better_html (1.0.16) - actionview (>= 4.0) - activesupport (>= 4.0) + base64 (0.2.0) + better_html (2.0.2) + actionview (>= 6.0) + activesupport (>= 6.0) ast (~> 2.0) erubi (~> 1.4) - html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties - builder (3.2.4) - concurrent-ruby (1.1.10) + bigdecimal (3.1.8) + builder (3.3.0) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) crass (1.0.6) - erb_lint (0.1.3) + drb (2.2.1) + erb_lint (0.2.0) activesupport - better_html (~> 1.0.7) - html_tokenizer + better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop smart_properties - erubi (1.12.0) - html_tokenizer (0.0.7) - i18n (1.12.0) + erubi (1.13.0) + i18n (1.14.5) concurrent-ruby (~> 1.0) - loofah (2.19.1) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mini_portile2 (2.8.1) - minitest (5.17.0) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + nokogiri (>= 1.12.0) + mini_portile2 (2.8.7) + minitest (5.24.1) + mutex_m (0.2.0) + nokogiri (1.15.6) + mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.22.1) parser (3.1.3.0) ast (~> 2.4.1) - racc (1.6.2) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + racc (1.8.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.4) - loofah (~> 2.19, >= 2.19.1) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) rainbow (3.1.1) regexp_parser (2.6.1) rexml (3.2.5) @@ -69,7 +78,7 @@ GEM parser (>= 3.1.1.0) ruby-progressbar (1.11.0) smart_properties (1.17.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.3.0) @@ -77,7 +86,7 @@ PLATFORMS ruby DEPENDENCIES - erb_lint (~> 0.1.1) + erb_lint (~> 0.2.0) rubocop (~> 1.12.0) BUNDLED WITH diff --git a/yarn.lock b/yarn.lock index 504fed50..e4822e09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -313,14 +313,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@es-joy/jsdoccomment@~0.36.1": - version "0.36.1" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz#c37db40da36e4b848da5fd427a74bae3b004a30f" - integrity sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg== +"@es-joy/jsdoccomment@~0.38.0": + version "0.38.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.38.0.tgz#2e74f8d824b4a4ec831eaabd4c3548fb11eae5cd" + integrity sha512-TFac4Bnv0ZYNkEeDnOWHQhaS1elWlvOCQxH06iHeu5iffs+hCaLVIZJwF+FqksQi68R4i66Pu+4DfFGvble+Uw== dependencies: comment-parser "1.3.1" - esquery "^1.4.0" - jsdoc-type-pratt-parser "~3.1.0" + esquery "^1.5.0" + jsdoc-type-pratt-parser "~4.0.0" "@eslint/eslintrc@^1.4.1": version "1.4.1" @@ -809,6 +809,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +are-docs-informative@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963" + integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1299,17 +1304,18 @@ eslint-plugin-import@^2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jsdoc@^39.6.7: - version "39.6.7" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.6.7.tgz#f7f9abec75993b9cb3ede814c1d9d5afc3d7bf22" - integrity sha512-0mrzXrHvL2ZLe3QK9X0OEDy7Fs2cFQ/f1d1G5KHEGD+13D1qg56Iovq0uOkYf5bJlHiKPytWVgOOO9y7kLW3VA== +eslint-plugin-jsdoc@^43.2.0: + version "43.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.2.0.tgz#9d0df2329100a6956635f26211d0723c3ff91f15" + integrity sha512-Hst7XUfqh28UmPD52oTXmjaRN3d0KrmOZdgtp4h9/VHUJD3Evoo82ZGXi1TtRDWgWhvqDIRI63O49H0eH7NrZQ== dependencies: - "@es-joy/jsdoccomment" "~0.36.1" + "@es-joy/jsdoccomment" "~0.38.0" + are-docs-informative "^0.0.2" comment-parser "1.3.1" debug "^4.3.4" escape-string-regexp "^4.0.0" - esquery "^1.4.0" - semver "^7.3.8" + esquery "^1.5.0" + semver "^7.5.0" spdx-expression-parse "^3.0.1" eslint-scope@^7.1.1: @@ -1403,6 +1409,13 @@ esquery@^1.4.0: dependencies: estraverse "^5.1.0" +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -2314,10 +2327,10 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsdoc-type-pratt-parser@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" - integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw== +jsdoc-type-pratt-parser@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz#136f0571a99c184d84ec84662c45c29ceff71114" + integrity sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ== jsesc@^2.5.1: version "2.5.2" @@ -2795,13 +2808,18 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.5, semver@^7.3.8: +semver@^7.3.5: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" +semver@^7.5.0: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2814,10 +2832,10 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shescape@^1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/shescape/-/shescape-1.6.4.tgz#b29a1cc33657ee48d624d89a8f7c8b9da780fe1d" - integrity sha512-3nJDj7UyM2V6UTjVH2PR/FVVKytxlT1sN8FdGHsF0KlyAHxWatdwZAc7D6UMhYw8BRmAeow/t7X62ABAineUjg== +shescape@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/shescape/-/shescape-1.7.4.tgz#49d0cc9b46b4ed1ed929a30fcdc47ffc6a3553ee" + integrity sha512-6eaKkGvkiR86VmRfFaT1RYP0DtYnOj3u3WR41ItGqADBZMtr0lI4iTnqakE65gnRwHIF7XNvqA9oaE31EZsB7Q== dependencies: which "^2.0.0"