diff --git a/.eslintrc b/.eslintrc index 79a6f52cd..e3c90dca5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,5 +1,11 @@ { - "plugins": ["jsdoc", "lodash", "security"], + "plugins": [ + "n", + "jsdoc", + "lodash", + "security", + "@stylistic/js" + ], "env": { "browser": false, "node": true, @@ -18,18 +24,14 @@ // Possible Errors "for-direction": "error", "default-param-last": "error", - "function-call-argument-newline": "off", "getter-return": "error", "no-async-promise-executor": "error", "no-await-in-loop": "error", "no-compare-neg-zero": "error", "no-cond-assign": "error", - "no-console": [ - "error", - { - "allow": ["info", "warn", "error"] - } - ], + "no-console": ["error", { + "allow": ["info", "warn", "error"] + }], "no-constant-condition": "error", "no-control-regex": "error", "no-constructor-return": "error", @@ -42,8 +44,6 @@ "no-empty-character-class": "error", "no-ex-assign": "error", "no-extra-boolean-cast": "error", - "no-extra-parens": "off", - "no-extra-semi": "error", "no-func-assign": "error", "no-import-assign": "error", "no-inner-declarations": "error", @@ -51,7 +51,6 @@ "no-irregular-whitespace": "error", "no-loss-of-precision": "error", "no-misleading-character-class": "error", - "no-nonoctal-decimal-escape": "error", "no-obj-calls": "error", "no-prototype-builtins": "error", "no-regex-spaces": "error", @@ -61,7 +60,6 @@ "no-unreachable": "error", "no-unsafe-finally": "error", "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", "prefer-regex-literals": "error", "require-atomic-updates": "error", "require-unicode-regexp": "off", @@ -78,28 +76,29 @@ "curly": "error", "default-case": "error", "default-case-last": "error", - "dot-location": ["error", "property"], "dot-notation": "error", "eqeqeq": "error", "grouped-accessor-pairs": "warn", "guard-for-in": "warn", "id-denylist": "warn", + "logical-assignment-operators": "off", "max-classes-per-file": ["error", 1], "max-lines-per-function": "off", "no-alert": "error", "no-caller": "error", "no-case-declarations": "error", + "no-constant-binary-expression": "error", "no-div-regex": "error", "no-else-return": "error", "no-empty-function": "error", "no-empty-pattern": "error", + "no-empty-static-block": "error", "no-eq-null": "error", "no-eval": "error", "no-extend-native": "error", "no-extra-bind": "error", "no-extra-label": "error", "no-fallthrough": "error", - "no-floating-decimal": "error", "no-global-assign": "error", "no-implicit-coercion": "error", "no-implicit-globals": "error", @@ -110,11 +109,11 @@ "no-lone-blocks": "error", "no-loop-func": "error", "no-magic-numbers": "off", - "no-multi-spaces": "error", "no-multi-str": "error", "no-new": "error", "no-new-func": "error", "no-new-wrappers": "error", + "no-nonoctal-decimal-escape": "error", "no-octal": "error", "no-octal-escape": "error", "no-param-reassign": "off", @@ -124,7 +123,6 @@ "no-restricted-exports": "error", "no-restricted-properties": "error", "no-return-assign": "error", - "no-return-await": "error", "no-script-url": "error", "no-self-assign": "error", "no-self-compare": "error", @@ -133,8 +131,10 @@ "no-throw-literal": "error", "no-unmodified-loop-condition": "error", "no-unreachable-loop": "error", + "no-unsafe-optional-chaining": "error", "no-unused-expressions": "off", "no-unused-labels": "error", + "no-unused-private-class-members": "error", "no-useless-call": "error", "no-useless-concat": "error", "no-useless-backreference": "error", @@ -145,12 +145,12 @@ "no-with": "error", "prefer-named-capture-group": "off", "prefer-exponentiation-operator": "warn", + "prefer-object-has-own": "error", "prefer-object-spread": "error", "prefer-promise-reject-errors": "error", "radix": "error", "require-await": "error", "vars-on-top": "off", - "wrap-iife": "error", "yoda": "error", // Strict Mode @@ -170,229 +170,202 @@ "no-use-before-define": "error", // Node.js and CommonJS - "callback-return": "error", - "global-require": "off", - "handle-callback-err": "error", - "no-buffer-constructor": "error", - "no-mixed-requires": "off", - "no-new-require": "off", - "no-path-concat": "error", - "no-process-env": "error", - "no-process-exit": "off", - "no-restricted-modules": "error", - "no-sync": "off", + "n/callback-return": "error", + "n/global-require": "off", + "n/handle-callback-err": "error", + "n/no-mixed-requires": "off", + "n/no-new-require": "off", + "n/no-path-concat": "error", + "n/no-process-env": "error", + "n/no-process-exit": "off", + "n/no-sync": "off", + + // ECMAScript 6 + "arrow-body-style": ["error", "always"], + "constructor-super": "error", + "no-class-assign": "error", + "no-const-assign": "error", + "no-dupe-class-members": "error", + "no-duplicate-imports": "error", + "no-new-native-nonconstructor": "error", + "no-new-symbol": "error", + "no-restricted-imports": "error", + "no-this-before-super": "error", + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-var": "off", + "object-shorthand": ["error", "consistent-as-needed"], + "prefer-arrow-callback": "off", + "prefer-const": "off", + "prefer-destructuring": "off", + "prefer-numeric-literals": "off", + "prefer-rest-params": "off", + "prefer-spread": "error", + "prefer-template": "off", + "require-yield": "error", + "sort-imports": "off", + "symbol-description": "off", // Stylistic Issues - "array-bracket-newline": "off", - "array-bracket-spacing": "error", - "array-element-newline": "off", - "block-spacing": "error", - "brace-style": [ - "error", - "stroustrup", + "@stylistic/js/array-bracket-newline": "off", + "@stylistic/js/array-bracket-spacing": "error", + "@stylistic/js/array-element-newline": "off", + "@stylistic/js/arrow-parens": ["error", "always"], + "@stylistic/js/arrow-spacing": "error", + "@stylistic/js/block-spacing": "error", + "@stylistic/js/brace-style": ["error", "stroustrup", { + "allowSingleLine": true + }], + "@stylistic/js/comma-dangle": ["error", "never"], + "@stylistic/js/comma-spacing": ["error", { + "before": false, + "after": true + }], + "@stylistic/js/comma-style": ["error", "last"], + "@stylistic/js/computed-property-spacing": "error", + "@stylistic/js/dot-location": ["error", "property"], + "@stylistic/js/eol-last": "error", + "@stylistic/js/func-call-spacing": "error", + "@stylistic/js/function-call-argument-newline": "off", + "@stylistic/js/function-paren-newline": ["error", "never"], + "@stylistic/js/generator-star-spacing": "error", + "@stylistic/js/implicit-arrow-linebreak": ["error", "beside"], + "@stylistic/js/indent": ["error", 4, { + "VariableDeclarator": { + "var": 1, + "let": 1, + "const": 1 + }, + "SwitchCase": 1 + }], + "@stylistic/js/jsx-quotes": ["error", "prefer-single"], + "@stylistic/js/key-spacing": "error", + "@stylistic/js/keyword-spacing": "error", + "@stylistic/js/linebreak-style": ["error", "unix"], + "@stylistic/js/lines-around-comment": ["error", { + "beforeBlockComment": true, + "afterBlockComment": false, + "beforeLineComment": false, + "afterLineComment": false, + "allowBlockStart": true, + "allowBlockEnd": false, + "allowObjectStart": true, + "allowObjectEnd": false, + "allowArrayStart": true, + "allowArrayEnd": false + }], + "@stylistic/js/lines-between-class-members": ["error", "always", { + "exceptAfterSingleLine": true + }], + "@stylistic/js/max-len": ["error", { + "code": 120 + }], + "@stylistic/js/max-statements-per-line": ["error", { + "max": 2 + }], + "@stylistic/js/multiline-ternary": "off", + "@stylistic/js/new-parens": "error", + "@stylistic/js/newline-per-chained-call": ["error", { + "ignoreChainWithDepth": 4 + }], + "@stylistic/js/no-confusing-arrow": "error", + "@stylistic/js/no-extra-parens": "off", + "@stylistic/js/no-extra-semi": "error", + "@stylistic/js/no-floating-decimal": "error", + "@stylistic/js/no-mixed-operators": "off", + "@stylistic/js/no-mixed-spaces-and-tabs": "error", + "@stylistic/js/no-multi-spaces": "error", + "@stylistic/js/no-multiple-empty-lines": "error", + "@stylistic/js/no-tabs": "error", + "@stylistic/js/no-trailing-spaces": "error", + "@stylistic/js/no-whitespace-before-property": "error", + "@stylistic/js/nonblock-statement-body-position": "error", + "@stylistic/js/object-curly-newline": "off", + "@stylistic/js/object-curly-spacing": ["error", "always"], + "@stylistic/js/object-property-newline": "off", + "@stylistic/js/one-var-declaration-per-line": "error", + "@stylistic/js/operator-linebreak": ["error", "after"], + "@stylistic/js/padded-blocks": ["error", "never"], + "@stylistic/js/padding-line-between-statements": ["error", + { + "blankLine": "always", + "prev": "*", + "next": "return" + }, + { + "blankLine": "always", + "prev": ["const", "let", "var"], + "next": "*" + }, { - "allowSingleLine": true + "blankLine": "any", + "prev": ["const", "let", "var"], + "next": ["const", "let", "var"] } ], + "@stylistic/js/quote-props": ["error", "as-needed"], + "@stylistic/js/quotes": ["error", "single"], + "@stylistic/js/rest-spread-spacing": "error", + "@stylistic/js/semi": "error", + "@stylistic/js/semi-spacing": "error", + "@stylistic/js/semi-style": ["error", "last"], + "@stylistic/js/space-before-blocks": "error", + "@stylistic/js/space-before-function-paren": "error", + "@stylistic/js/space-in-parens": "error", + "@stylistic/js/space-infix-ops": "error", + "@stylistic/js/space-unary-ops": "error", + "@stylistic/js/spaced-comment": ["error", "always", { + "block": { + "exceptions": ["!"] + } + }], + "@stylistic/js/switch-colon-spacing": "error", + "@stylistic/js/template-curly-spacing": "error", + "@stylistic/js/template-tag-spacing": "error", + "@stylistic/js/wrap-iife": "error", + "@stylistic/js/wrap-regex": "error", + "@stylistic/js/yield-star-spacing": "error", "camelcase": "off", "capitalized-comments": "off", - "comma-dangle": ["error", "never"], - "comma-spacing": [ - "error", - { - "before": false, - "after": true - } - ], - "comma-style": ["error", "last"], - "computed-property-spacing": "error", "consistent-this": "off", - "eol-last": "error", - "func-call-spacing": "error", - "func-name-matching": "off", + "func-name-matching": "error", "func-names": "off", "func-style": "off", - "function-paren-newline": ["error", "never"], - "id-blacklist": "error", "id-length": "off", "id-match": "error", - "implicit-arrow-linebreak": ["error", "beside"], - "indent": [ - "error", - 4, - { - "VariableDeclarator": { - "var": 1, - "let": 1, - "const": 1 - }, - "SwitchCase": 1 - } - ], - "jsx-quotes": ["error", "prefer-single"], - "key-spacing": "error", - "keyword-spacing": "error", "line-comment-position": "off", - "linebreak-style": ["error", "unix"], - "lines-around-comment": [ - "error", - { - "beforeBlockComment": true, - "afterBlockComment": false, - "beforeLineComment": false, - "afterLineComment": false, - "allowBlockStart": true, - "allowBlockEnd": false, - "allowObjectStart": true, - "allowObjectEnd": false, - "allowArrayStart": true, - "allowArrayEnd": false - } - ], - "lines-between-class-members": [ - "error", - "always", - { - "exceptAfterSingleLine": true - } - ], "max-depth": "error", - "max-len": [ - "error", - { - "code": 120 - } - ], "max-lines": "off", "max-nested-callbacks": "error", "max-params": "off", "max-statements": "off", - "max-statements-per-line": [ - "error", - { - "max": 2 - } - ], "multiline-comment-style": "off", - "multiline-ternary": "off", "new-cap": "off", - "new-parens": "error", - "newline-per-chained-call": [ - "error", - { - "ignoreChainWithDepth": 4 - } - ], "no-array-constructor": "error", "no-bitwise": "off", "no-continue": "off", "no-inline-comments": "off", "no-lonely-if": "error", - "no-mixed-operators": "off", - "no-mixed-spaces-and-tabs": "error", "no-multi-assign": "off", - "no-multiple-empty-lines": "error", "no-negated-condition": "off", "no-nested-ternary": "off", - "no-new-object": "error", + "no-object-constructor": "error", "no-plusplus": "off", "no-restricted-syntax": "error", - "no-tabs": "error", "no-ternary": "off", - "no-trailing-spaces": "error", "no-underscore-dangle": "off", "no-unneeded-ternary": "error", - "no-whitespace-before-property": "error", - "nonblock-statement-body-position": "error", - "object-curly-newline": "off", - "object-curly-spacing": ["error", "always"], - "object-property-newline": "off", "one-var": ["error", "always"], - "one-var-declaration-per-line": "error", "operator-assignment": "error", - "operator-linebreak": ["error", "after"], - "padded-blocks": ["error", "never"], - "padding-line-between-statements": [ - "error", - { - "blankLine": "always", - "prev": "*", - "next": "return" - }, - { - "blankLine": "always", - "prev": ["const", "let", "var"], - "next": "*" - }, - { - "blankLine": "any", - "prev": ["const", "let", "var"], - "next": ["const", "let", "var"] - } - ], - "quote-props": ["error", "as-needed"], - "quotes": ["error", "single"], - "semi": "error", - "semi-spacing": "error", - "semi-style": ["error", "last"], "sort-keys": "off", "sort-vars": "off", - "space-before-blocks": "error", - "space-before-function-paren": "error", - "space-in-parens": "error", - "space-infix-ops": "error", - "space-unary-ops": "error", - "spaced-comment": [ - "error", - "always", - { - "block": { - "exceptions": ["!"] - } - } - ], - "switch-colon-spacing": "error", - "template-tag-spacing": "error", "unicode-bom": "error", - "wrap-regex": "error", - - // ECMAScript 6 - "arrow-body-style": ["error", "always"], - "arrow-parens": ["error", "always"], - "arrow-spacing": "error", - "constructor-super": "error", - "generator-star-spacing": "error", - "no-class-assign": "error", - "no-confusing-arrow": "error", - "no-const-assign": "error", - "no-dupe-class-members": "error", - "no-duplicate-imports": "error", - "no-new-symbol": "error", - "no-restricted-imports": "error", - "no-this-before-super": "error", - "no-useless-catch": "error", - "no-useless-computed-key": "error", - "no-useless-constructor": "error", - "no-useless-rename": "error", - "no-var": "off", - "object-shorthand": ["error", "consistent-as-needed"], - "prefer-arrow-callback": "off", - "prefer-const": "off", - "prefer-destructuring": "off", - "prefer-numeric-literals": "off", - "prefer-rest-params": "off", - "prefer-spread": "error", - "prefer-template": "off", - "require-yield": "error", - "rest-spread-spacing": "error", - "sort-imports": "off", - "symbol-description": "off", - "template-curly-spacing": "error", - "yield-star-spacing": "error", // Lodash "lodash/callback-binding": "error", - "lodash/collection-method-value": "off", + "lodash/collection-method-value": "warn", "lodash/collection-return": "error", "lodash/no-double-unwrap": "error", "lodash/no-extra-args": "error", @@ -421,12 +394,9 @@ "lodash/prefer-constant": "off", "lodash/prefer-get": ["warn", 4], - "lodash/prefer-includes": [ - "error", - { - "includeNative": true - } - ], + "lodash/prefer-includes": ["error", { + "includeNative": true + }], "lodash/prefer-is-nil": "error", "lodash/prefer-lodash-chain": "error", "lodash/prefer-lodash-method": "off", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b9ebb645..4bfeac746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16, 18] + node-version: [18, 20] os: [ubuntu-latest, windows-latest] steps: @@ -47,10 +47,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Use Node.js 20 + - name: Use latest Node.js uses: actions/setup-node@v3 with: - node-version: 20 + node-version: latest cache: "npm" - name: Install diff --git a/CHANGELOG.yaml b/CHANGELOG.yaml index 496b07243..ccbc98a14 100644 --- a/CHANGELOG.yaml +++ b/CHANGELOG.yaml @@ -1,3 +1,11 @@ +unreleased: + breaking changes: + - GH-1605 Dropped support for Node < v18 + chores: + - GH-1605 Updated dependencies + - GH-1605 Updated ESLint rules + - GH-1605 Run code coverage on latest Node version in CI + 6.2.1: date: 2024-08-20 fixed bugs: diff --git a/examples/run-collections-in-directory.js b/examples/run-collections-in-directory.js index 22e24c32b..6b00656ef 100755 --- a/examples/run-collections-in-directory.js +++ b/examples/run-collections-in-directory.js @@ -19,6 +19,7 @@ fs.readdir('./examples', function (err, files) { newman.run({ // we load collection using require. for better validation and handling // JSON.parse could be used + // eslint-disable-next-line n/no-path-concat collection: require(`${__dirname}/${file}`) }, function (err) { // finally, when the collection executes, print the status diff --git a/lib/config/rc-file.js b/lib/config/rc-file.js index 75f35e097..44dc573b1 100644 --- a/lib/config/rc-file.js +++ b/lib/config/rc-file.js @@ -1,4 +1,4 @@ -/* eslint-disable no-process-env */ +/* eslint-disable n/no-process-env */ var _ = require('lodash'), fs = require('fs'), join = require('path').join, diff --git a/lib/reporters/cli/cli-utils.js b/lib/reporters/cli/cli-utils.js index e25933aa5..3a2f8122f 100644 --- a/lib/reporters/cli/cli-utils.js +++ b/lib/reporters/cli/cli-utils.js @@ -175,7 +175,7 @@ cliUtils = { } return { - exists: !(Boolean(process.env.CI) || !process.stdout.isTTY), // eslint-disable-line no-process-env + exists: !(Boolean(process.env.CI) || !process.stdout.isTTY), // eslint-disable-line n/no-process-env width: width, height: height }; diff --git a/lib/reporters/cli/index.js b/lib/reporters/cli/index.js index 9a7fe1721..cfe773697 100644 --- a/lib/reporters/cli/index.js +++ b/lib/reporters/cli/index.js @@ -259,7 +259,7 @@ PostmanCLIReporter = function (emitter, reporterOptions, options) { } reqText = wrap(reqText, ` ${colors.white(symbols.console.middle)} `); - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len print.buffer(` ${colors.white(symbols.console.top)} ${colors.white(symbols.up)} ${reqBodyMode} ${colors.gray(symbols.star)} ${util.filesize(reqTextLen)}\n`, colors.white(` ${symbols.console.bottom}`)) // tweak the message to ensure that its surrounding is not brightly coloured. @@ -278,7 +278,7 @@ PostmanCLIReporter = function (emitter, reporterOptions, options) { } resText = wrap(resText, ` ${colors.white(symbols.console.middle)} `); - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len print.buffer(` ${colors.white(symbols.console.top)} ${colors.white(symbols.down)} ${resSummary} ${colors.gray(symbols.star)} ${util.filesize(resTextLen)}\n`, colors.white(` ${symbols.console.bottom}`)) // tweak the message to ensure that its surrounding is not brightly coloured. @@ -443,38 +443,40 @@ _.assignIn(PostmanCLIReporter, { }); // add specific rows to show in summary - stats && _.forEach([{ - source: 'iterations', - label: 'iterations' - }, { - source: 'requests', - label: 'requests' - }, { - source: 'testScripts', - label: 'test-scripts' - }, { - source: 'prerequestScripts', - label: 'prerequest-scripts' - }, { - source: 'assertions', - label: 'assertions' - }], function (row) { - var metric = stats[row.source], - label = row.label; - - // colour the label based on the failure or pending count of the metric - label = metric.failed ? colors.red(label) : (metric.pending ? label : colors.green(label)); - - // push the statistics - summaryTable.push([ - label, - metric.total, - (metric.failed ? colors.red(metric.failed) : metric.failed) - // @todo - add information of pending scripts - // (metric.failed ? colors.red(metric.failed) : metric.failed) + - // (metric.pending ? format(' (%d pending)', metric.pending) : E) - ]); - }); + if (stats) { + _.forEach([{ + source: 'iterations', + label: 'iterations' + }, { + source: 'requests', + label: 'requests' + }, { + source: 'testScripts', + label: 'test-scripts' + }, { + source: 'prerequestScripts', + label: 'prerequest-scripts' + }, { + source: 'assertions', + label: 'assertions' + }], function (row) { + var metric = stats[row.source], + label = row.label; + + // colour the label based on the failure or pending count of the metric + label = metric.failed ? colors.red(label) : (metric.pending ? label : colors.green(label)); + + // push the statistics + summaryTable.push([ + label, + metric.total, + (metric.failed ? colors.red(metric.failed) : metric.failed) + // @todo - add information of pending scripts + // (metric.failed ? colors.red(metric.failed) : metric.failed) + + // (metric.pending ? format(' (%d pending)', metric.pending) : E) + ]); + }); + } // add the total execution time to summary timings && summaryTable.push([{ @@ -491,21 +493,23 @@ _.assignIn(PostmanCLIReporter, { }]); // add rows containing average time of different request phases - timings && _.forEach({ - response: 'average response time:', - dns: 'average DNS lookup time:', - firstByte: 'average first byte time:' - }, (value, key) => { - timings[`${key}Average`] && summaryTable.push([{ - colSpan: 3, - content: format(`${value} %s [min: %s, max: %s, s.d.: %s]`, - util.prettyms(timings[`${key}Average`]), - util.prettyms(timings[`${key}Min`]), - util.prettyms(timings[`${key}Max`]), - util.prettyms(timings[`${key}Sd`])), - hAlign: 'left' - }]); - }); + if (timings) { + _.forEach({ + response: 'average response time:', + dns: 'average DNS lookup time:', + firstByte: 'average first byte time:' + }, (value, key) => { + timings[`${key}Average`] && summaryTable.push([{ + colSpan: 3, + content: format(`${value} %s [min: %s, max: %s, s.d.: %s]`, + util.prettyms(timings[`${key}Average`]), + util.prettyms(timings[`${key}Min`]), + util.prettyms(timings[`${key}Max`]), + util.prettyms(timings[`${key}Sd`])), + hAlign: 'left' + }]); + }); + } return summaryTable; }, diff --git a/lib/run/export-file.js b/lib/run/export-file.js index dc35f52da..2d94df12e 100644 --- a/lib/run/export-file.js +++ b/lib/run/export-file.js @@ -103,7 +103,7 @@ module.exports = function (options, done) { }); }, function (next) { - fs.stat(path.unparsed, function (err, stat) { // eslint-disable-line handle-callback-err + fs.stat(path.unparsed, function (err, stat) { // eslint-disable-line n/handle-callback-err next(null, stat); }); }, diff --git a/lib/run/index.js b/lib/run/index.js index b63409691..9898da6a0 100644 --- a/lib/run/index.js +++ b/lib/run/index.js @@ -360,64 +360,67 @@ module.exports = function (options, callback) { // initialise all the reporters !emitter.reporters && (emitter.reporters = {}); - _.isArray(reporters) && _.forEach(reporters, function (reporterName) { - // disallow duplicate reporter initialisation - if (_.has(emitter.reporters, reporterName)) { return; } - var Reporter; + if (_.isArray(reporters)) { + _.forEach(reporters, function (reporterName) { + // disallow duplicate reporter initialisation + if (_.has(emitter.reporters, reporterName)) { return; } - try { - // check if the reporter is an external reporter - Reporter = require((function (name) { // ensure scoped packages are loaded - var prefix = '', - scope = (name.charAt(0) === '@') && name.substr(0, name.indexOf('/') + 1); + var Reporter; - if (scope) { - prefix = scope; - name = name.substr(scope.length); - } + try { + // check if the reporter is an external reporter + Reporter = require((function (name) { // ensure scoped packages are loaded + var prefix = '', + scope = (name.charAt(0) === '@') && name.substr(0, name.indexOf('/') + 1); - return prefix + 'newman-reporter-' + name; - }(reporterName))); - } - // @todo - maybe have a debug mode and log error there - catch (error) { - if (!defaultReporters[reporterName]) { - // @todo: route this via print module to respect silent flags - console.warn(`newman: could not find "${reporterName}" reporter`); - console.warn(' ensure that the reporter is installed in the same directory as newman'); - - // print install instruction in case a known reporter is missing - if (knownReporterErrorMessages[reporterName]) { - console.warn(knownReporterErrorMessages[reporterName]); - } - else { - console.warn(' please install reporter using npm\n'); + if (scope) { + prefix = scope; + name = name.substr(scope.length); + } + + return prefix + 'newman-reporter-' + name; + }(reporterName))); + } + // @todo - maybe have a debug mode and log error there + catch (error) { + if (!defaultReporters[reporterName]) { + // @todo: route this via print module to respect silent flags + console.warn(`newman: could not find "${reporterName}" reporter`); + console.warn(' ensure that the reporter is installed in the same directory as newman'); + + // print install instruction in case a known reporter is missing + if (knownReporterErrorMessages[reporterName]) { + console.warn(knownReporterErrorMessages[reporterName]); + } + else { + console.warn(' please install reporter using npm\n'); + } } } - } - // load local reporter if its not an external reporter - !Reporter && (Reporter = defaultReporters[reporterName]); + // load local reporter if its not an external reporter + !Reporter && (Reporter = defaultReporters[reporterName]); - try { - // we could have checked _.isFunction(Reporter), here, but we do not do that so that the nature of - // reporter error can be bubbled up - Reporter && (emitter.reporters[reporterName] = new Reporter(emitter, - _.get(options, ['reporter', reporterName], {}), options)); - } - catch (error) { - // if the reporter errored out during initialisation, we should not stop the run simply log - // the error stack trace for debugging - console.warn(`newman: could not load "${reporterName}" reporter`); - - if (!defaultReporters[reporterName]) { - // @todo: route this via print module to respect silent flags - console.warn(` this seems to be a problem in the "${reporterName}" reporter.\n`); + try { + // we could have checked _.isFunction(Reporter), here, but we do + // not do that so that the nature of reporter error can be bubbled up + Reporter && (emitter.reporters[reporterName] = new Reporter(emitter, + _.get(options, ['reporter', reporterName], {}), options)); } - console.warn(error); - } - }); + catch (error) { + // if the reporter errored out during initialisation, we should not stop the run simply log + // the error stack trace for debugging + console.warn(`newman: could not load "${reporterName}" reporter`); + + if (!defaultReporters[reporterName]) { + // @todo: route this via print module to respect silent flags + console.warn(` this seems to be a problem in the "${reporterName}" reporter.\n`); + } + console.warn(error); + } + }); + } // raise warning when more than one dominant reporters are used (function (reporters) { diff --git a/lib/run/options.js b/lib/run/options.js index 19c876ce2..ddb31ea19 100644 --- a/lib/run/options.js +++ b/lib/run/options.js @@ -383,13 +383,17 @@ module.exports = function (options, callback) { config.get(options, { loaders: configLoaders, command: 'run' }, function (err, result) { if (err) { return callback(err); } - !_.isEmpty(options.globalVar) && _.forEach(options.globalVar, function (variable) { - variable && (result.globals.set(variable.key, variable.value)); - }); + if (!_.isEmpty(options.globalVar)) { + _.forEach(options.globalVar, function (variable) { + variable && (result.globals.set(variable.key, variable.value)); + }); + } - !_.isEmpty(options.envVar) && _.forEach(options.envVar, function (variable) { - variable && (result.environment.set(variable.key, variable.value)); - }); + if (!_.isEmpty(options.envVar)) { + _.forEach(options.envVar, function (variable) { + variable && (result.environment.set(variable.key, variable.value)); + }); + } callback(null, result); }); diff --git a/lib/run/summary.js b/lib/run/summary.js index 932dcf79b..78208aac6 100644 --- a/lib/run/summary.js +++ b/lib/run/summary.js @@ -319,43 +319,45 @@ _.assign(RunSummary, { timings = timings && timings.timings; timingPhases = timings && sdk.Response.timingPhases(timings); - (timingPhases || time) && _.forEach([ - 'dns', - 'firstByte', - 'response' - ], (value) => { - var currentValue = (value === 'response') ? time : (timingPhases && timingPhases[value]), - previousAverage = summary.run.timings[`${value}Average`], - previousVariance = summary.run.timings[`${value}Sd`] ** 2, - delta1 = currentValue - previousAverage, - delta2, - currentVariance; - - if (!currentValue) { return; } - - // compute average time for the given phase of request - summary.run.timings[`${value}Average`] = - (previousAverage * (requestCount - 1) + currentValue) / requestCount; - - // compute minimum time for the given phase of request - if (!summary.run.timings[`${value}Min`]) { - summary.run.timings[`${value}Min`] = currentValue; - } - else { - summary.run.timings[`${value}Min`] = - Math.min(summary.run.timings[`${value}Min`], currentValue); - } + if (timingPhases || time) { + _.forEach([ + 'dns', + 'firstByte', + 'response' + ], (value) => { + var currentValue = (value === 'response') ? time : (timingPhases && timingPhases[value]), + previousAverage = summary.run.timings[`${value}Average`], + previousVariance = summary.run.timings[`${value}Sd`] ** 2, + delta1 = currentValue - previousAverage, + delta2, + currentVariance; + + if (!currentValue) { return; } + + // compute average time for the given phase of request + summary.run.timings[`${value}Average`] = + (previousAverage * (requestCount - 1) + currentValue) / requestCount; + + // compute minimum time for the given phase of request + if (!summary.run.timings[`${value}Min`]) { + summary.run.timings[`${value}Min`] = currentValue; + } + else { + summary.run.timings[`${value}Min`] = + Math.min(summary.run.timings[`${value}Min`], currentValue); + } - // compute maximum time the given phase of request - summary.run.timings[`${value}Max`] = Math.max(summary.run.timings[`${value}Max`], currentValue); + // compute maximum time the given phase of request + summary.run.timings[`${value}Max`] = Math.max(summary.run.timings[`${value}Max`], currentValue); - // compute standard deviation for the given phase of request - // refer Welford's online algorithm from - // https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance - delta2 = currentValue - summary.run.timings[`${value}Average`]; - currentVariance = (previousVariance * (requestCount - 1) + (delta1 * delta2)) / requestCount; - summary.run.timings[`${value}Sd`] = Math.sqrt(currentVariance); - }); + // compute standard deviation for the given phase of request + // refer Welford's online algorithm from + // https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance + delta2 = currentValue - summary.run.timings[`${value}Average`]; + currentVariance = (previousVariance * (requestCount - 1) + (delta1 * delta2)) / requestCount; + summary.run.timings[`${value}Sd`] = Math.sqrt(currentVariance); + }); + } }); }, diff --git a/lib/util.js b/lib/util.js index cc3ca64b5..5baac6653 100644 --- a/lib/util.js +++ b/lib/util.js @@ -95,10 +95,12 @@ util = { * @returns {Object} - {event1: time1, event2: time2, ...} (time in string with appropriate unit) */ beautifyTime: function (obj) { - return _.forEach(obj, (value, key) => { + _.forEach(obj, (value, key) => { // convert only non-zero values value && (obj[key] = this.prettyms(value)); }); + + return obj; }, /** @@ -196,7 +198,7 @@ util = { if (response.statusCode !== 200) { const resource = isPostmanHost ? _(urlObj.getPath()).split('/').get(1).slice(0, -1) : 'resource', error = new Error(_.get(body, 'error.message', - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len `Error fetching ${resource}, the provided URL returned status code: ${response.statusCode}`)); return callback(_.assign(error, { diff --git a/package-lock.json b/package-lock.json index fcaf00c85..bd6487259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,21 +10,21 @@ "license": "Apache-2.0", "dependencies": { "@postman/tough-cookie": "4.1.3-postman.1", - "async": "3.2.5", + "async": "3.2.6", "chardet": "2.0.0", "cli-progress": "3.12.0", "cli-table3": "0.6.5", "colors": "1.4.0", "commander": "11.1.0", "csv-parse": "4.16.3", - "filesize": "10.1.4", + "filesize": "10.1.6", "liquid-json": "0.3.1", "lodash": "4.17.21", "mkdirp": "3.0.1", - "postman-collection": "4.4.0", + "postman-collection": "4.5.0", "postman-collection-transformer": "4.1.8", "postman-request": "2.88.1-postman.34", - "postman-runtime": "7.39.1", + "postman-runtime": "7.42.0", "pretty-ms": "7.0.1", "semver": "7.6.3", "serialised-error": "1.1.3", @@ -36,18 +36,20 @@ }, "devDependencies": { "@postman/shipit": "^0.4.0", - "chai": "^4.4.1", + "@stylistic/eslint-plugin-js": "^1.8.0", + "chai": "^4.5.0", "dependency-check": "^4.1.0", "dockerfile_lint": "^0.3.4", "editorconfig": "^2.0.0", - "eslint": "^8.56.0", - "eslint-plugin-jsdoc": "^46.9.1", + "eslint": "^8.57.0", + "eslint-plugin-jsdoc": "^47.0.2", "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-mocha": "^10.5.0", + "eslint-plugin-n": "^16.6.2", "eslint-plugin-security": "^2.1.1", "js-yaml": "^4.1.0", "mocha": "^10.7.3", - "nock": "^13.5.4", + "nock": "^13.5.5", "nyc": "^15.1.0", "parse-gitignore": "^2.0.0", "recursive-readdir": "^2.2.3", @@ -57,7 +59,7 @@ "xml2js": "^0.6.2" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -447,9 +449,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", - "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -857,12 +859,71 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.8.1.tgz", + "integrity": "sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@stylistic/eslint-plugin-js/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "node_modules/@types/eslint": { + "version": "8.56.12", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -873,6 +934,12 @@ "@types/node": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -924,9 +991,9 @@ } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1170,9 +1237,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -1376,6 +1443,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/builtins": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -1428,9 +1504,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -1439,12 +1515,21 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" } }, + "node_modules/chai/node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2275,10 +2360,46 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-compat-utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", + "dev": true, + "dependencies": { + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, + "node_modules/eslint-plugin-es-x": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/ota-meshi", + "https://opencollective.com/eslint" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": ">=8" + } + }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.10.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", - "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", + "version": "47.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-47.0.2.tgz", + "integrity": "sha512-sIq81Pv+yrhhwY0m1JH79rdZRgDNunehv3S0Yv0UfewpoeJyPkODFn2o4o20nofVoI2tjku9/QBcCYUmmeWFXA==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.41.0", @@ -2369,6 +2490,34 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-plugin-n": { + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz", + "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "builtins": "^5.0.1", + "eslint-plugin-es-x": "^7.5.0", + "get-tsconfig": "^4.7.0", + "globals": "^13.24.0", + "ignore": "^5.2.4", + "is-builtin-module": "^3.2.1", + "is-core-module": "^2.12.1", + "minimatch": "^3.1.2", + "resolve": "^1.22.2", + "semver": "^7.5.3" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-plugin-security": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-2.1.1.tgz", @@ -2712,9 +2861,9 @@ } }, "node_modules/filesize": { - "version": "10.1.4", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.4.tgz", - "integrity": "sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg==", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.6.tgz", + "integrity": "sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w==", "engines": { "node": ">= 10.4.0" } @@ -2789,8 +2938,7 @@ "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" }, "node_modules/for-each": { "version": "0.3.3", @@ -2855,10 +3003,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -2954,6 +3105,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -3221,6 +3384,18 @@ "node": ">=8" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -3475,6 +3650,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -3912,10 +4102,9 @@ } }, "node_modules/jose": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", - "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==", - "license": "MIT", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.6.3.tgz", + "integrity": "sha512-1Jh//hEEwMhNYPDDLwXHa2ePWgWiFNNUadVmguAAw2IJ6sj9mNxV5tGXJNqlMkJAybF6Lgw1mISDxTePP/187g==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -4646,9 +4835,9 @@ } }, "node_modules/nock": { - "version": "13.5.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", - "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "version": "13.5.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", + "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -5215,10 +5404,9 @@ } }, "node_modules/postman-collection": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.4.0.tgz", - "integrity": "sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q==", - "license": "Apache-2.0", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.5.0.tgz", + "integrity": "sha512-152JSW9pdbaoJihwjc7Q8lc3nPg/PC9lPTHdMk7SHnHhu/GBJB7b2yb9zG7Qua578+3PxkQ/HYBuXpDSvsf7GQ==", "dependencies": { "@faker-js/faker": "5.5.3", "file-type": "3.9.0", @@ -5229,7 +5417,7 @@ "mime-format": "2.0.1", "mime-types": "2.1.35", "postman-url-encoder": "3.0.5", - "semver": "7.5.4", + "semver": "7.6.3", "uuid": "8.3.2" }, "engines": { @@ -5276,21 +5464,6 @@ "node": ">=10" } }, - "node_modules/postman-collection/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/postman-collection/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -5341,40 +5514,70 @@ } }, "node_modules/postman-runtime": { - "version": "7.39.1", - "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.39.1.tgz", - "integrity": "sha512-IRNrBE0l1K3ZqQhQVYgF6MPuqOB9HqYncal+a7RpSS+sysKLhJMkC9SfUn1HVuOpokdPkK92ykvPzj8kCOLYAg==", - "license": "Apache-2.0", + "version": "7.42.0", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.42.0.tgz", + "integrity": "sha512-eFpRuadSyfMSBa8nZIMhOKXHJB6zvtQ4uPnSoyaVgHgMIS2pN8zXL0979qDB80v3wswJ44wSgGd1/gLqAIyGGw==", "dependencies": { "@postman/tough-cookie": "4.1.3-postman.1", "async": "3.2.5", - "aws4": "1.12.0", + "aws4": "1.13.1", "handlebars": "4.7.8", "httpntlm": "1.8.13", - "jose": "4.14.4", + "jose": "5.6.3", "js-sha512": "0.9.0", "lodash": "4.17.21", "mime-types": "2.1.35", "node-forge": "1.3.1", "node-oauth1": "1.3.0", "performance-now": "2.1.0", - "postman-collection": "4.4.0", - "postman-request": "2.88.1-postman.34", - "postman-sandbox": "4.7.1", + "postman-collection": "4.5.0", + "postman-request": "2.88.1-postman.40", + "postman-sandbox": "5.1.2", "postman-url-encoder": "3.0.5", "serialised-error": "1.1.3", "strip-json-comments": "3.1.1", "uuid": "8.3.2" }, "engines": { - "node": ">=12" + "node": ">=16" } }, - "node_modules/postman-runtime/node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "license": "MIT" + "node_modules/postman-runtime/node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/postman-runtime/node_modules/postman-request": { + "version": "2.88.1-postman.40", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.40.tgz", + "integrity": "sha512-uE4AiIqhjtHKp4pj9ei7fkdfNXEX9IqDBlK1plGAQne6y79UUlrTdtYLhwXoO0AMOvqyl9Ar+BU6Eo6P/MPgfg==", + "dependencies": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.4", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "brotli": "^1.3.3", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.3", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 16" + } }, "node_modules/postman-runtime/node_modules/uuid": { "version": "8.3.2", @@ -5385,18 +5588,17 @@ } }, "node_modules/postman-sandbox": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.7.1.tgz", - "integrity": "sha512-H2wYSLK0mB588IaxoLrLoPbpmxsIcwFtgaK2c8gAsAQ+TgYFePwb4qdeVcYDMqmwrLd77/ViXkjasP/sBMz1sQ==", - "license": "Apache-2.0", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-5.1.2.tgz", + "integrity": "sha512-14PvPVgMVz+2pk988ueKqxlW/LbQIwHMU0pHx3vSimFxtbFOMNF3bdIKzi7wUPrhba4khefIlcnpGqpPrNlnXA==", "dependencies": { "lodash": "4.17.21", - "postman-collection": "4.4.0", + "postman-collection": "4.5.0", "teleport-javascript": "1.0.0", - "uvm": "2.1.1" + "uvm": "3.0.0" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/postman-url-encoder": { @@ -5639,12 +5841,17 @@ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5659,6 +5866,15 @@ "node": ">=8" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6152,6 +6368,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tar-fs": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", @@ -6227,8 +6455,7 @@ "node_modules/teleport-javascript": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/teleport-javascript/-/teleport-javascript-1.0.0.tgz", - "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==", - "license": "ISC" + "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==" }, "node_modules/test-exclude": { "version": "6.0.0", @@ -6490,23 +6717,16 @@ } }, "node_modules/uvm": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.1.1.tgz", - "integrity": "sha512-BZ5w8adTpNNr+zczOBRpaX/hH8UPKAf7fmCnidrcsqt3bn8KT9bDIfuS7hgRU9RXgiN01su2pwysBONY6w8W5w==", - "license": "Apache-2.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-3.0.0.tgz", + "integrity": "sha512-dATVpxsNfFBpHNdq6sy4/CV2UnoRbV8tvvkK0VrUPnm+o7dK6fnir4LEm8czeDdpbw2KKDKjIPcRSZY4AEwEZA==", "dependencies": { - "flatted": "3.2.6" + "flatted": "3.3.1" }, "engines": { - "node": ">=10" + "node": ">=16" } }, - "node_modules/uvm/node_modules/flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "license": "ISC" - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -7220,9 +7440,9 @@ } }, "@eslint-community/regexpp": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", - "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true }, "@eslint/eslintrc": { @@ -7541,12 +7761,55 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, + "@stylistic/eslint-plugin-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.8.1.tgz", + "integrity": "sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ==", + "dev": true, + "requires": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + } + } + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "@types/eslint": { + "version": "8.56.12", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -7557,6 +7820,12 @@ "@types/node": "*" } }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -7576,9 +7845,9 @@ "dev": true }, "acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true }, "acorn-jsx": { @@ -7758,9 +8027,9 @@ "dev": true }, "async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" }, "asynckit": { "version": "0.4.0", @@ -7932,6 +8201,15 @@ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true }, + "builtins": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", + "dev": true, + "requires": { + "semver": "^7.0.0" + } + }, "caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -7972,9 +8250,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -7983,7 +8261,15 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" + }, + "dependencies": { + "type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true + } } }, "chalk": { @@ -8734,10 +9020,30 @@ } } }, + "eslint-compat-utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", + "dev": true, + "requires": { + "semver": "^7.5.4" + } + }, + "eslint-plugin-es-x": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" + } + }, "eslint-plugin-jsdoc": { - "version": "46.10.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", - "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", + "version": "47.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-47.0.2.tgz", + "integrity": "sha512-sIq81Pv+yrhhwY0m1JH79rdZRgDNunehv3S0Yv0UfewpoeJyPkODFn2o4o20nofVoI2tjku9/QBcCYUmmeWFXA==", "dev": true, "requires": { "@es-joy/jsdoccomment": "~0.41.0", @@ -8798,6 +9104,25 @@ "rambda": "^7.4.0" } }, + "eslint-plugin-n": { + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz", + "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "builtins": "^5.0.1", + "eslint-plugin-es-x": "^7.5.0", + "get-tsconfig": "^4.7.0", + "globals": "^13.24.0", + "ignore": "^5.2.4", + "is-builtin-module": "^3.2.1", + "is-core-module": "^2.12.1", + "minimatch": "^3.1.2", + "resolve": "^1.22.2", + "semver": "^7.5.3" + } + }, "eslint-plugin-security": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-2.1.1.tgz", @@ -8956,9 +9281,9 @@ "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" }, "filesize": { - "version": "10.1.4", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.4.tgz", - "integrity": "sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg==" + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.6.tgz", + "integrity": "sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w==" }, "fill-range": { "version": "7.1.1", @@ -9009,8 +9334,7 @@ "flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" }, "for-each": { "version": "0.3.3", @@ -9062,9 +9386,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, "function.prototype.name": { @@ -9131,6 +9455,15 @@ "get-intrinsic": "^1.1.1" } }, + "get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -9318,6 +9651,15 @@ "type-fest": "^0.8.0" } }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -9497,6 +9839,15 @@ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, + "is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "requires": { + "hasown": "^2.0.2" + } + }, "is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -9815,9 +10166,9 @@ } }, "jose": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", - "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==" + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.6.3.tgz", + "integrity": "sha512-1Jh//hEEwMhNYPDDLwXHa2ePWgWiFNNUadVmguAAw2IJ6sj9mNxV5tGXJNqlMkJAybF6Lgw1mISDxTePP/187g==" }, "js-md4": { "version": "0.3.2", @@ -10379,9 +10730,9 @@ } }, "nock": { - "version": "13.5.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", - "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "version": "13.5.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", + "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -10808,9 +11159,9 @@ } }, "postman-collection": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.4.0.tgz", - "integrity": "sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.5.0.tgz", + "integrity": "sha512-152JSW9pdbaoJihwjc7Q8lc3nPg/PC9lPTHdMk7SHnHhu/GBJB7b2yb9zG7Qua578+3PxkQ/HYBuXpDSvsf7GQ==", "requires": { "@faker-js/faker": "5.5.3", "file-type": "3.9.0", @@ -10821,18 +11172,10 @@ "mime-format": "2.0.1", "mime-types": "2.1.35", "postman-url-encoder": "3.0.5", - "semver": "7.5.4", + "semver": "7.6.3", "uuid": "8.3.2" }, "dependencies": { - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -10904,35 +11247,64 @@ } }, "postman-runtime": { - "version": "7.39.1", - "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.39.1.tgz", - "integrity": "sha512-IRNrBE0l1K3ZqQhQVYgF6MPuqOB9HqYncal+a7RpSS+sysKLhJMkC9SfUn1HVuOpokdPkK92ykvPzj8kCOLYAg==", + "version": "7.42.0", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.42.0.tgz", + "integrity": "sha512-eFpRuadSyfMSBa8nZIMhOKXHJB6zvtQ4uPnSoyaVgHgMIS2pN8zXL0979qDB80v3wswJ44wSgGd1/gLqAIyGGw==", "requires": { "@postman/tough-cookie": "4.1.3-postman.1", "async": "3.2.5", - "aws4": "1.12.0", + "aws4": "1.13.1", "handlebars": "4.7.8", "httpntlm": "1.8.13", - "jose": "4.14.4", + "jose": "5.6.3", "js-sha512": "0.9.0", "lodash": "4.17.21", "mime-types": "2.1.35", "node-forge": "1.3.1", "node-oauth1": "1.3.0", "performance-now": "2.1.0", - "postman-collection": "4.4.0", - "postman-request": "2.88.1-postman.34", - "postman-sandbox": "4.7.1", + "postman-collection": "4.5.0", + "postman-request": "2.88.1-postman.40", + "postman-sandbox": "5.1.2", "postman-url-encoder": "3.0.5", "serialised-error": "1.1.3", "strip-json-comments": "3.1.1", "uuid": "8.3.2" }, "dependencies": { - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + "async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "postman-request": { + "version": "2.88.1-postman.40", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.40.tgz", + "integrity": "sha512-uE4AiIqhjtHKp4pj9ei7fkdfNXEX9IqDBlK1plGAQne6y79UUlrTdtYLhwXoO0AMOvqyl9Ar+BU6Eo6P/MPgfg==", + "requires": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.4", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "brotli": "^1.3.3", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.3", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + } }, "uuid": { "version": "8.3.2", @@ -10942,14 +11314,14 @@ } }, "postman-sandbox": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.7.1.tgz", - "integrity": "sha512-H2wYSLK0mB588IaxoLrLoPbpmxsIcwFtgaK2c8gAsAQ+TgYFePwb4qdeVcYDMqmwrLd77/ViXkjasP/sBMz1sQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-5.1.2.tgz", + "integrity": "sha512-14PvPVgMVz+2pk988ueKqxlW/LbQIwHMU0pHx3vSimFxtbFOMNF3bdIKzi7wUPrhba4khefIlcnpGqpPrNlnXA==", "requires": { "lodash": "4.17.21", - "postman-collection": "4.4.0", + "postman-collection": "4.5.0", "teleport-javascript": "1.0.0", - "uvm": "2.1.1" + "uvm": "3.0.0" } }, "postman-url-encoder": { @@ -11129,12 +11501,14 @@ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -11143,6 +11517,12 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -11521,6 +11901,12 @@ "has-flag": "^3.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "tar-fs": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", @@ -11801,18 +12187,11 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "uvm": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.1.1.tgz", - "integrity": "sha512-BZ5w8adTpNNr+zczOBRpaX/hH8UPKAf7fmCnidrcsqt3bn8KT9bDIfuS7hgRU9RXgiN01su2pwysBONY6w8W5w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-3.0.0.tgz", + "integrity": "sha512-dATVpxsNfFBpHNdq6sy4/CV2UnoRbV8tvvkK0VrUPnm+o7dK6fnir4LEm8czeDdpbw2KKDKjIPcRSZY4AEwEZA==", "requires": { - "flatted": "3.2.6" - }, - "dependencies": { - "flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" - } + "flatted": "3.3.1" } }, "validate-npm-package-license": { diff --git a/package.json b/package.json index eaa8edf24..a87128dc7 100644 --- a/package.json +++ b/package.json @@ -37,21 +37,21 @@ }, "dependencies": { "@postman/tough-cookie": "4.1.3-postman.1", - "async": "3.2.5", + "async": "3.2.6", "chardet": "2.0.0", "cli-progress": "3.12.0", "cli-table3": "0.6.5", "colors": "1.4.0", "commander": "11.1.0", "csv-parse": "4.16.3", - "filesize": "10.1.4", + "filesize": "10.1.6", "liquid-json": "0.3.1", "lodash": "4.17.21", "mkdirp": "3.0.1", - "postman-collection": "4.4.0", + "postman-collection": "4.5.0", "postman-collection-transformer": "4.1.8", "postman-request": "2.88.1-postman.34", - "postman-runtime": "7.39.1", + "postman-runtime": "7.42.0", "pretty-ms": "7.0.1", "semver": "7.6.3", "serialised-error": "1.1.3", @@ -60,18 +60,20 @@ }, "devDependencies": { "@postman/shipit": "^0.4.0", - "chai": "^4.4.1", + "@stylistic/eslint-plugin-js": "^1.8.0", + "chai": "^4.5.0", "dependency-check": "^4.1.0", "dockerfile_lint": "^0.3.4", "editorconfig": "^2.0.0", - "eslint": "^8.56.0", - "eslint-plugin-jsdoc": "^46.9.1", + "eslint": "^8.57.0", + "eslint-plugin-jsdoc": "^47.0.2", "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-mocha": "^10.5.0", + "eslint-plugin-n": "^16.6.2", "eslint-plugin-security": "^2.1.1", "js-yaml": "^4.1.0", "mocha": "^10.7.3", - "nock": "^13.5.4", + "nock": "^13.5.5", "nyc": "^15.1.0", "parse-gitignore": "^2.0.0", "recursive-readdir": "^2.2.3", @@ -81,6 +83,6 @@ "xml2js": "^0.6.2" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/test/cli/cli-reporter-failure-details.test.js b/test/cli/cli-reporter-failure-details.test.js index 4f32a7290..733d2b9fe 100644 --- a/test/cli/cli-reporter-failure-details.test.js +++ b/test/cli/cli-reporter-failure-details.test.js @@ -2,7 +2,7 @@ const expect = require('chai').expect; describe('CLI reporter failure details', function () { it('should correctly show complete details for the failure list', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-request-failing.json --reporter-cli-no-assertion --reporter-cli-no-summary', function (code, stdout, stderr) { expect(code).be.ok; expect(stderr).to.be.empty; diff --git a/test/cli/color-tty.test.js b/test/cli/color-tty.test.js index a043723f7..c34440936 100644 --- a/test/cli/color-tty.test.js +++ b/test/cli/color-tty.test.js @@ -19,7 +19,7 @@ describe('CLI output', function () { }); it('should produce colored output with `--color on`', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json --color on', function (code, stdout, stderr) { expect(code, 'should have exit code of 0').to.equal(0); expect(stderr).to.be.empty; @@ -30,7 +30,7 @@ describe('CLI output', function () { }); it('should not produce colored output with `--color off`', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json --color off', function (code, stdout, stderr) { expect(code, 'should have exit code of 0').to.equal(0); expect(stderr).to.be.empty; diff --git a/test/cli/export-environment.test.js b/test/cli/export-environment.test.js index e86afb7d5..c07bd2430 100644 --- a/test/cli/export-environment.test.js +++ b/test/cli/export-environment.test.js @@ -18,7 +18,7 @@ describe('newman run --export-environment', function () { }); it('should export environment to a file', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -e test/fixtures/run/simple-variables.json --export-environment out/test-environment.json', function (code) { var environment; @@ -39,7 +39,7 @@ describe('newman run --export-environment', function () { }); it('should export environment to a file even if collection is failing', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-request-failing.json -e test/fixtures/run/simple-variables.json --export-environment out/test-environment.json', function (code) { var environment; @@ -60,7 +60,7 @@ describe('newman run --export-environment', function () { }); it('`newman run` should export environment to a file in a pre-existing directory', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -e test/fixtures/run/simple-variables.json --export-environment out', function (code) { var environment, dir = fs.readdirSync(outDir), @@ -85,7 +85,7 @@ describe('newman run --export-environment', function () { }); it('should override exported environment with those provided via --env-var', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/overrides/pmcollection.json --env-var dummyVar=bar2 --export-environment out/test-environment.json', function (code) { var environment; @@ -105,7 +105,7 @@ describe('newman run --export-environment', function () { }); it('should override exported environment with those provided via --env-var even when run fails', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/overrides/failing-collection.json --env-var dummyVar=bar3 --export-environment out/test-environment.json', function (code) { var environment; diff --git a/test/cli/export-globals.test.js b/test/cli/export-globals.test.js index c5104748c..dd7a1f6bf 100644 --- a/test/cli/export-globals.test.js +++ b/test/cli/export-globals.test.js @@ -19,7 +19,7 @@ describe('newman run --export-globals', function () { }); it('should export globals to a file', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -g test/fixtures/run/simple-variables.json --export-globals out/test-globals.json', function (code) { var globals; @@ -40,7 +40,7 @@ describe('newman run --export-globals', function () { }); it('should export globals to a file even if collection is failing', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-request-failing.json -g test/fixtures/run/simple-variables.json --export-globals out/test-globals.json', function (code) { var globals; @@ -61,7 +61,7 @@ describe('newman run --export-globals', function () { }); it('should override exported globals with those provided via --global-var', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-request-failing.json -g test/fixtures/run/simple-variables.json --global-var foo=bar --export-globals out/test-globals.json', function (code) { var globals; @@ -83,7 +83,7 @@ describe('newman run --export-globals', function () { }); it('`newman run` should export globals to a file in a pre-existing directory', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -g test/fixtures/run/simple-variables.json --export-globals out', function (code) { var globals, dir = fs.readdirSync(outDir), @@ -108,7 +108,7 @@ describe('newman run --export-globals', function () { }); it('should export globals with a name when provided under --global-var', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-request-failing.json --global-var foo=bar --export-globals out/test-globals.json', function (code) { var globals; diff --git a/test/cli/iteration-count.test.js b/test/cli/iteration-count.test.js index 02adbef2b..54f104dbc 100644 --- a/test/cli/iteration-count.test.js +++ b/test/cli/iteration-count.test.js @@ -16,7 +16,7 @@ describe('iterationCount vs iterationData.length conflicts', function () { }); it('should iterate exactly once when no options are specified', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -r json --reporter-json-export out/iteration-count-test.json', function (code) { var collectionRun; @@ -30,7 +30,7 @@ describe('iterationCount vs iterationData.length conflicts', function () { }); it('should iterate according to iterationData.length when specified', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/steph/steph.postman_collection.json -d test/integration/steph/steph.postman_data.json -r json --reporter-json-export out/iteration-count-test.json', function (code) { var collectionRun; @@ -44,7 +44,7 @@ describe('iterationCount vs iterationData.length conflicts', function () { }); it('should iterate according to iterationCount when specified', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json --iteration-count 3 -r json --reporter-json-export out/iteration-count-test.json', function (code) { var collectionRun; @@ -58,7 +58,7 @@ describe('iterationCount vs iterationData.length conflicts', function () { }); it('should iterate according to iterationCount when BOTH options are specified', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/steph/steph.postman_collection.json -d test/integration/steph/steph.postman_data.json --iteration-count 3 -r json --reporter-json-export out/iteration-count-test.json', function (code) { var collectionRun; diff --git a/test/cli/run-options.test.js b/test/cli/run-options.test.js index 274b0f489..8d6b45767 100644 --- a/test/cli/run-options.test.js +++ b/test/cli/run-options.test.js @@ -57,7 +57,7 @@ describe('CLI run options', function () { }); it('should handle invalid collection URLs correctly', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run https://api.getpostman.com/collections/my-collection-uuid?apikey=my-secret-api-key', function (code) { expect(code, 'should have exit code of 1').to.equal(1); done(); @@ -65,7 +65,7 @@ describe('CLI run options', function () { }); it('should correctly work with global variable overrides passed with --global-var', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/steph/steph.postman_collection.json --global-var first=James --global-var last=Bond', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); @@ -73,7 +73,7 @@ describe('CLI run options', function () { }); it('should throw an error for missing --global-var values', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/steph/steph.postman_collection.json --global-var', function (code, stdout, stderr) { expect(code, 'should have exit code of 1').to.equal(1); expect(stderr).to.equal('error: option \'--global-var \' argument missing\n'); @@ -82,7 +82,7 @@ describe('CLI run options', function () { }); it('should correctly work with environment variable overrides passed with --env-var', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/overrides/pmcollection.json --env-var dummyVar=bar2', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); @@ -90,7 +90,7 @@ describe('CLI run options', function () { }); it('should throw an error for missing --env-var values', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/overrides/pmcollection.json --env-var', function (code, stdout, stderr) { expect(code, 'should have exit code of 1').to.equal(1); expect(stderr).to.equal('error: option \'--env-var \' argument missing\n'); @@ -99,7 +99,7 @@ describe('CLI run options', function () { }); it('should log a warning if the v1 collection format is used', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/multi-level-folders-v1.postman_collection.json', function (code, stdout, stderr) { expect(code, 'should have exit code of 0').to.equal(0); expect(stderr).to.equal('newman: Newman v4 deprecates support for the v1 collection format\n' + @@ -111,7 +111,7 @@ describe('CLI run options', function () { describe('script timeouts', function () { it('should be handled correctly when breached', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 5', function (code) { // .to.be.(1) is not used as the windows exit code can be an arbitrary non-zero value expect(code, 'should have non-zero exit code').to.be.above(0); @@ -120,7 +120,7 @@ describe('CLI run options', function () { }); it('should be handled correctly when not breached', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 500', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); diff --git a/test/cli/shallow-junit-reporter.test.js b/test/cli/shallow-junit-reporter.test.js index f6bcc5fee..f6c2f50b6 100644 --- a/test/cli/shallow-junit-reporter.test.js +++ b/test/cli/shallow-junit-reporter.test.js @@ -19,7 +19,7 @@ describe('JUnit reporter', function () { }); it('should correctly generate the junit report for a successful run', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-get-request.json -r junit --reporter-junit-export ${outFile}`, function (code) { expect(code, 'should have exit code of 0').to.equal(0); @@ -55,7 +55,7 @@ describe('JUnit reporter', function () { }); it('should correctly generate the junit report for a failed run', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-request-failing.json -r junit --reporter-junit-export ${outFile}`, function (code) { expect(code, 'should have exit code of 1').to.equal(1); @@ -98,7 +98,7 @@ describe('JUnit reporter', function () { }); it('should correctly produce the junit report for a run with TypeError', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/newman-report-test.json -r junit --reporter-junit-export ${outFile}`, function (code) { expect(code, 'should have exit code of 1').to.equal(1); @@ -137,7 +137,7 @@ describe('JUnit reporter', function () { }); it('should correctly produce the JUnit report in a pre-existing directory', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json -r junit --reporter-junit-export out', function (code) { expect(code).to.equal(0); @@ -151,7 +151,7 @@ describe('JUnit reporter', function () { }); it('should correctly handle the `--reporter-junit-export=` argument', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-get-request.json -r junit --reporter-junit-export=${outFile}`, function (code) { expect(code, 'should have exit code of 0').to.equal(0); @@ -160,7 +160,7 @@ describe('JUnit reporter', function () { }); it('should correctly generate the junit report for a run with nested requests', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/nested-requests-report-test.json -r junit --reporter-junit-export ${outFile}`, function (code) { expect(code, 'should have exit code of 0').to.equal(0); @@ -196,7 +196,7 @@ describe('JUnit reporter', function () { }); it('should correctly generate the junit report for a failed run with nested requests', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/nested-requests-fail-report-test.json -r junit --reporter-junit-export ${outFile}`, function (code) { expect(code, 'should have exit code of 0').to.equal(1); diff --git a/test/cli/ssl-client-cert.test.js b/test/cli/ssl-client-cert.test.js index 73e91dfd0..73616ec03 100644 --- a/test/cli/ssl-client-cert.test.js +++ b/test/cli/ssl-client-cert.test.js @@ -78,7 +78,7 @@ describe('SSL Client certificates', function () { // @todo: add .pfx, .pem tests as well it('should work correctly with standalone client certificates', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/ssl-client-cert.json --ssl-client-cert test/fixtures/ssl/client.crt --ssl-client-key test/fixtures/ssl/client.key --ssl-client-passphrase password -k', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); @@ -86,7 +86,7 @@ describe('SSL Client certificates', function () { }); it('should work correctly with a trusted CA certificate provided', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/ssl-client-cert.json --ssl-client-cert test/fixtures/ssl/client.crt --ssl-client-key test/fixtures/ssl/client.key --ssl-client-passphrase password --ssl-extra-ca-certs test/fixtures/ssl/ca.crt', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); @@ -94,7 +94,7 @@ describe('SSL Client certificates', function () { }); it('should work correctly with multiple client certificates', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/ssl-client-cert-list.json --verbose --ssl-client-cert-list ./test/fixtures/files/ssl-client-cert-config.json -k', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); diff --git a/test/cli/suppress-exit-code.test.js b/test/cli/suppress-exit-code.test.js index cdf581c6c..d632bc298 100644 --- a/test/cli/suppress-exit-code.test.js +++ b/test/cli/suppress-exit-code.test.js @@ -2,7 +2,7 @@ const expect = require('chai').expect; describe('newman run --suppress-exit-code', function () { it('should accept the --suppress-exit-code parameter', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec('node ./bin/newman.js run test/fixtures/run/single-get-request.json --suppress-exit-code', function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); diff --git a/test/cli/working-directory.test.js b/test/cli/working-directory.test.js index acd35963b..b951fbb73 100644 --- a/test/cli/working-directory.test.js +++ b/test/cli/working-directory.test.js @@ -5,7 +5,7 @@ const path = require('path'), describe('newman run --working-dir --no-insecure-file-read', function () { it('should resolve file present inside working directory', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-file-inside.json --working-dir ${workingDir}`, function (code) { expect(code, 'should have exit code of 0').to.equal(0); done(); @@ -13,7 +13,7 @@ describe('newman run --working-dir --no-insecure-file-read', function () { }); it('should not resolve file present outside working directory with --no-insecure-file-read', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-file-outside.json --working-dir ${workingDir} --no-insecure-file-read`, function (code, stdout) { expect(code, 'should have exit code of 1').to.equal(1); expect(stdout).to.have.string('AssertionError'); @@ -22,7 +22,7 @@ describe('newman run --working-dir --no-insecure-file-read', function () { }); it('should resolve file present outside working directory by default', function (done) { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len exec(`node ./bin/newman.js run test/fixtures/run/single-file-outside.json --working-dir ${workingDir}`, function (code, stdout) { expect(code, 'should have exit code of 0').to.equal(0); expect(stdout).to.not.have.string('AssertionError'); diff --git a/test/library/run-options.test.js b/test/library/run-options.test.js index 0bd3abe6b..25180e0d9 100644 --- a/test/library/run-options.test.js +++ b/test/library/run-options.test.js @@ -94,9 +94,9 @@ describe('Newman run options', function () { 'accept-encoding': 'gzip, deflate, br', 'user-agent': `PostmanRuntime/${runtimeVersion}` // change this when runtime is bumped }); - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len expect(executions[1].response.text()).to.equal('Hello World!

Hello World!

'); - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len expect(executions[2].response.text()).to.eql('Homestyle Breakfast950'); done(); diff --git a/test/system/repository.test.js b/test/system/repository.test.js index 8df3cbb89..275e6cd2e 100644 --- a/test/system/repository.test.js +++ b/test/system/repository.test.js @@ -48,7 +48,7 @@ describe('project repository', function () { expect(json.keywords).to.eql(['newman', 'postman', 'api', 'testing', 'ci', 'rest-client', 'rest']); expect(json).to.have.property('engines'); - expect(json.engines).to.eql({ node: '>=16' }); + expect(json.engines).to.eql({ node: '>=18' }); }); it('should have a valid version string in form of ..', function () { diff --git a/test/unit/options.test.js b/test/unit/options.test.js index d77c60e5a..ea7577e3a 100644 --- a/test/unit/options.test.js +++ b/test/unit/options.test.js @@ -16,7 +16,7 @@ describe('options', function () { // remove undefined properties result = JSON.parse(JSON.stringify(result.collection.toJSON())); expect(_.omit(result, - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len ['event', 'info._postman_id', 'variable', 'item.0.id', 'item.0.response', 'item.0.event.0.script.id'])) .to.eql(collection); done();