From afc97cb72159a95244e69858f9bc8367e8a55266 Mon Sep 17 00:00:00 2001 From: Chad Wilson Date: Wed, 14 Aug 2024 20:29:45 +0800 Subject: [PATCH] Fix cli npm package installs on Linux/MacOS (#2589) * Fix golint warnings Signed-off-by: Chad Wilson * Fix cli npm package installs on Linux/MacOS Locks package at 0.5.14 since 0.5.15 seemed to introduce the problem at https://github.com/cthackers/adm-zip/issues/530 Signed-off-by: Chad Wilson --------- Signed-off-by: Chad Wilson --- api/api.go | 10 +- api/lang/logger.go | 10 +- build/npm/package-lock.json | 827 ++++++++++++++++++++++++--------- build/npm/package.json | 2 +- cmd/cmd.go | 9 +- cmd/config.go | 15 +- cmd/list.go | 2 +- cmd/man.go | 6 +- cmd/run.go | 30 +- cmd/template.go | 8 +- env/env.go | 3 +- execution/execute.go | 2 +- execution/executionInfo.go | 2 +- execution/parallelExecution.go | 2 +- execution/scenarioExecutor.go | 16 +- execution/specExecutor.go | 6 +- filter/filter.go | 2 +- filter/specItemFilter.go | 2 +- parser/conceptParser.go | 2 +- parser/parse.go | 42 +- plugin/install/check.go | 6 +- plugin/install/install.go | 14 +- projectInit/init.go | 4 +- runner/grpcRunner.go | 2 +- runner/legacyRunner.go | 4 +- skel/plugin.go | 4 +- util/fileUtils.go | 2 +- util/rlimitUtil.go | 2 +- validation/suggest.go | 4 +- version/version.go | 2 +- 30 files changed, 714 insertions(+), 328 deletions(-) diff --git a/api/api.go b/api/api.go index 28a0af631..66776347b 100644 --- a/api/api.go +++ b/api/api.go @@ -122,13 +122,13 @@ func RunInBackground(apiPort string, specDirs []string) { if apiPort != "" { port, err = strconv.Atoi(apiPort) if err != nil { - logger.Fatalf(true, fmt.Sprintf("Invalid port number: %s", apiPort)) + logger.Fatalf(true, "Invalid port number: %s", apiPort) } os.Setenv(common.APIPortEnvVariableName, apiPort) } else { port, err = conn.GetPortFromEnvironmentVariable(common.APIPortEnvVariableName) if err != nil { - logger.Fatalf(true, fmt.Sprintf("Failed to start API Service. %s \n", err.Error())) + logger.Fatalf(true, "Failed to start API Service. %s \n", err.Error()) } } runAPIServiceIndefinitely(port, specDirs) @@ -140,18 +140,18 @@ func Start(specsDir []string) *conn.GaugeConnectionHandler { apiHandler := &gaugeAPIMessageHandler{specInfoGatherer: sig} gaugeConnectionHandler, err := conn.NewGaugeConnectionHandler(0, apiHandler) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } errChan := make(chan error) go func() { _, err := gaugeConnectionHandler.AcceptConnection(config.RunnerConnectionTimeout(), errChan) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } }() go func() { e := <-errChan - logger.Fatalf(true, e.Error()) + logger.Fatal(true, e.Error()) }() return gaugeConnectionHandler } diff --git a/api/lang/logger.go b/api/lang/logger.go index 8d9d0e333..018684ef3 100644 --- a/api/lang/logger.go +++ b/api/lang/logger.go @@ -20,7 +20,7 @@ type lspWriter struct { } func (w lspWriter) Write(p []byte) (n int, err error) { - logger.Debugf(false, string(p)) + logger.Debug(false, string(p)) return os.Stderr.Write(p) } @@ -61,25 +61,25 @@ func initialize(ctx context.Context, conn *jsonrpc2.Conn) { func logDebug(req *jsonrpc2.Request, msg string, args ...interface{}) { m := fmt.Sprintf(getLogFormatFor(req, msg), args...) - logger.Debugf(false, m) + logger.Debug(false, m) logToLsp(lsp.Log, m) } func logInfo(req *jsonrpc2.Request, msg string, args ...interface{}) { m := fmt.Sprintf(getLogFormatFor(req, msg), args...) - logger.Infof(false, m) + logger.Info(false, m) logToLsp(lsp.Info, m) } func logWarning(req *jsonrpc2.Request, msg string, args ...interface{}) { m := fmt.Sprintf(getLogFormatFor(req, msg), args...) - logger.Warningf(false, m) + logger.Warning(false, m) logToLsp(lsp.MTWarning, m) } func logError(req *jsonrpc2.Request, msg string, args ...interface{}) { m := fmt.Sprintf(getLogFormatFor(req, msg), args...) - logger.Errorf(false, m) + logger.Error(false, m) logToLsp(lsp.MTError, m) } diff --git a/build/npm/package-lock.json b/build/npm/package-lock.json index f3b979512..50a78d77d 100644 --- a/build/npm/package-lock.json +++ b/build/npm/package-lock.json @@ -1,491 +1,738 @@ { "name": "@getgauge/cli", + "lockfileVersion": 3, "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@sinonjs/commons": { + "packages": { + "": { + "name": "@getgauge/cli", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "adm-zip": "0.5.14" + }, + "bin": { + "gauge": "bin/gauge" + }, + "devDependencies": { + "chai": "^5.1.1", + "mocha": "^10.7.3", + "sinon": "^18.0.0" + } + }, + "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "type-detect": "4.0.8" } }, - "@sinonjs/fake-timers": { + "node_modules/@sinonjs/fake-timers": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "@sinonjs/commons": "^3.0.0" } }, - "@sinonjs/samsam": { + "node_modules/@sinonjs/samsam": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" - }, + } + }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } + "type-detect": "4.0.8" } }, - "@sinonjs/text-encoding": { + "node_modules/@sinonjs/text-encoding": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true - }, - "adm-zip": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.15.tgz", - "integrity": "sha512-jYPWSeOA8EFoZnucrKCNihqBjoEGQSU4HKgHYQgKNEQ0pQF9a/DYuo/+fAxY76k4qe75LUlLWpAM1QWcBMTOKw==" + "dev": true, + "license": "(Unlicense OR Apache-2.0)" + }, + "node_modules/adm-zip": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.14.tgz", + "integrity": "sha512-DnyqqifT4Jrcvb8USYjp6FHtBpEIz1mnXu6pTRHZ0RL69LbQYiO+0lDFg5+OKA7U29oWSs3a/i8fhn8ZcceIWg==", + "license": "MIT", + "engines": { + "node": ">=12.0" + } }, - "ansi-colors": { + "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "anymatch": { + "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "argparse": { + "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, - "assertion-error": { + "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, - "binary-extensions": { + "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "balanced-match": "^1.0.0" } }, - "braces": { + "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" } }, - "browser-stdout": { + "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, - "camelcase": { + "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "chai": { + "node_modules/chai": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" } }, - "chalk": { + "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "check-error": { + "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } }, - "chokidar": { + "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "cliui": { + "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, - "color-convert": { + "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, - "debug": { + "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ms": "2.1.2" }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "decamelize": { + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "deep-eql": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.1.tgz", - "integrity": "sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==", - "dev": true + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "diff": { + "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } }, - "emoji-regex": { + "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, - "escalade": { + "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "escape-string-regexp": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "fill-range": { + "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "find-up": { + "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "flat": { + "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, - "fsevents": { + "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "optional": true + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "get-caller-file": { + "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, - "get-func-name": { + "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } }, - "glob": { + "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "glob-parent": { + "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "has-flag": { + "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "he": { + "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, - "is-binary-path": { + "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "is-extglob": { + "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "is-glob": { + "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-number": { + "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } }, - "is-plain-obj": { + "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "is-unicode-supported": { + "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "js-yaml": { + "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "just-extend": { + "node_modules/just-extend": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true + "dev": true, + "license": "MIT" }, - "locate-path": { + "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "lodash.get": { + "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true + "dev": true, + "license": "MIT" }, - "log-symbols": { + "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "loupe": { + "node_modules/loupe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "get-func-name": "^2.0.1" } }, - "minimatch": { + "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "mocha": { + "node_modules/mocha": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", @@ -506,20 +753,29 @@ "yargs": "^16.2.0", "yargs-parser": "^20.2.9", "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" } }, - "ms": { + "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, - "nise": { + "node_modules/nise": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/nise/-/nise-6.0.0.tgz", "integrity": "sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", "@sinonjs/text-encoding": "^0.7.2", @@ -527,108 +783,169 @@ "path-to-regexp": "^6.2.1" } }, - "normalize-path": { + "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "wrappy": "1" } }, - "p-limit": { + "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "path-exists": { + "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "path-to-regexp": { + "node_modules/path-to-regexp": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", - "dev": true + "dev": true, + "license": "MIT" }, - "pathval": { + "node_modules/pathval": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } }, - "picomatch": { + "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "randombytes": { + "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "safe-buffer": "^5.1.0" } }, - "readdirp": { + "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" }, - "serialize-javascript": { + "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "randombytes": "^2.1.0" } }, - "sinon": { + "node_modules/sinon": { "version": "18.0.0", "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", "dev": true, - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "@sinonjs/commons": "^3.0.1", "@sinonjs/fake-timers": "^11.2.2", "@sinonjs/samsam": "^8.0.0", @@ -636,103 +953,153 @@ "nise": "^6.0.0", "supports-color": "^7" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "string-width": { + "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "type-detect": { + "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "workerpool": { + "node_modules/workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } }, - "yargs": { + "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -740,31 +1107,49 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/build/npm/package.json b/build/npm/package.json index 063f0658e..80eafd793 100644 --- a/build/npm/package.json +++ b/build/npm/package.json @@ -29,6 +29,6 @@ "sinon": "^18.0.0" }, "dependencies": { - "adm-zip": "^0.5.15" + "adm-zip": "0.5.14" } } diff --git a/cmd/cmd.go b/cmd/cmd.go index dfa6d2f66..fe007d63a 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -7,7 +7,6 @@ package cmd import ( - "fmt" "os" "path/filepath" @@ -165,20 +164,20 @@ func initPackageFlags() { var exit = func(err error, additionalText string) { if err != nil { - logger.Errorf(true, err.Error()) + logger.Error(true, err.Error()) } if additionalText != "" { - logger.Infof(true, additionalText) + logger.Info(true, additionalText) } os.Exit(1) } func loadEnvAndReinitLogger(cmd *cobra.Command) { var handler = func(err error) { - logger.Fatal(true, fmt.Sprintf("Failed to load env. %s", err.Error())) + logger.Fatalf(true, "Failed to load env. %s", err.Error()) } if e := env.LoadEnv(environment, handler); e != nil { - logger.Fatalf(true, e.Error()) + logger.Fatal(true, e.Error()) } initLogger(cmd.Name()) } diff --git a/cmd/config.go b/cmd/config.go index e9c1bb8ac..4c12f874c 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -7,8 +7,7 @@ package cmd import ( - "fmt" - + "errors" "github.com/getgauge/gauge/config" "github.com/getgauge/gauge/logger" "github.com/spf13/cobra" @@ -24,24 +23,24 @@ var ( if list || machineReadable { text, err := config.List(machineReadable) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } - logger.Infof(true, text) + logger.Info(true, text) return } if len(args) == 0 { - exit(fmt.Errorf("Config command needs argument(s)."), cmd.UsageString()) + exit(errors.New("Config command needs argument(s)."), cmd.UsageString()) } if len(args) == 1 { text, err := config.GetProperty(args[0]) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } - logger.Infof(true, text) + logger.Info(true, text) return } if err := config.Update(args[0], args[1]); err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } }, DisableAutoGenTag: true, diff --git a/cmd/list.go b/cmd/list.go index 75882c1fd..904670bd8 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -78,7 +78,7 @@ type handleResult func([]string) func print(res []string) { for _, element := range res { - logger.Infof(true, element) + logger.Info(true, element) } } diff --git a/cmd/man.go b/cmd/man.go index afc879e6b..b41888f3c 100644 --- a/cmd/man.go +++ b/cmd/man.go @@ -1,4 +1,4 @@ -// +build linux darwin +//go:build linux || darwin /*---------------------------------------------------------------- * Copyright (c) ThoughtWorks, Inc. @@ -33,10 +33,10 @@ var ( Run: func(cmd *cobra.Command, args []string) { out, err := getDefaultPath() if err != nil { - logger.Fatalf(true, "Cannot find the gauge home directory.") + logger.Fatal(true, "Cannot find the gauge home directory.") } if err := genManPages(out); err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } }, DisableAutoGenTag: true, diff --git a/cmd/run.go b/cmd/run.go index 829693c78..1159ea0f7 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -7,20 +7,20 @@ package cmd import ( - "fmt" - "os" - "strconv" - "strings" - gauge "github.com/getgauge/gauge/gauge" + "errors" "github.com/getgauge/gauge/config" "github.com/getgauge/gauge/env" "github.com/getgauge/gauge/execution" "github.com/getgauge/gauge/execution/rerun" + gauge "github.com/getgauge/gauge/gauge" "github.com/getgauge/gauge/logger" "github.com/getgauge/gauge/plugin/install" "github.com/getgauge/gauge/util" "github.com/spf13/cobra" "github.com/spf13/pflag" + "os" + "strconv" + "strings" ) const ( @@ -129,7 +129,7 @@ func init() { f.StringVarP(&tagsToFilterForParallelRun, onlyName, "o", onlyDefault, "Execute only the specs and scenarios tagged with given tags in parallel, rest will be run in serial. Applicable only if run in parallel.") err := f.MarkHidden(onlyName) if err != nil { - logger.Errorf(false, fmt.Sprintf("Unable to mark '%s' flag as hidden: %s", onlyName, err.Error())) + logger.Errorf(false, "Unable to mark '%s' flag as hidden: %s", onlyName, err.Error()) } f.IntVarP(&group, groupName, "g", groupDefault, "Specify which group of specification to execute based on -n flag") f.StringVarP(&strategy, strategyName, "", strategyDefault, "Set the parallelization strategy for execution. Possible options are: `eager`, `lazy`") @@ -142,7 +142,7 @@ func init() { f.BoolVarP(&skipCommandSave, skipCommandSaveName, "", skipCommandSaveDefault, "Skip saving last command in lastRunCmd.json") err = f.MarkHidden(skipCommandSaveName) if err != nil { - logger.Errorf(false, fmt.Sprintf("Unable to mark '%s' flag as hidden: %s", skipCommandSaveName, err.Error())) + logger.Errorf(false, "Unable to mark '%s' flag as hidden: %s", skipCommandSaveName, err.Error()) } f.StringArrayVar(&scenarios, scenarioName, scenarioNameDefault, "Set scenarios for running specs with scenario name") @@ -159,12 +159,12 @@ func executeFailed(cmd *cobra.Command) { handleFlags(cmd, append([]string{"gauge"}, lastState...)) err = cmd.Flags().Set(skipCommandSaveName, "true") if err != nil { - logger.Errorf(false, fmt.Sprintf("Unable to set '%s' flag as 'true': %s", skipCommandSaveName, err.Error())) + logger.Errorf(false, "Unable to set '%s' flag as 'true': %s", skipCommandSaveName, err.Error()) } logger.Debugf(true, "Executing => %s\n", strings.Join(os.Args, " ")) err = cmd.Execute() if err != nil { - logger.Errorf(true, fmt.Sprintf("Unable to execute command %s: %s", cmd.Name(), err.Error())) + logger.Errorf(true, "Unable to execute command %s: %s", cmd.Name(), err.Error()) } } @@ -173,7 +173,7 @@ func handleFlags(cmd *cobra.Command, args []string) { if !util.ListContains(overrideRerunFlags, flag.Name) && flag.Changed { err := flag.Value.Set(flag.DefValue) if err != nil { - logger.Errorf(false, fmt.Sprintf("Unable to set default value in '%s' flag: %s", flag.Name, err.Error())) + logger.Errorf(false, "Unable to set default value in '%s' flag: %s", flag.Name, err.Error()) } } }) @@ -251,7 +251,7 @@ var repeatLastExecution = func(cmd *cobra.Command) { logger.Debugf(true, "Executing => %s\n", strings.Join(lastState, " ")) err := cmd.Execute() if err != nil { - logger.Errorf(true, fmt.Sprintf("Unable to execute command %s: %s", cmd.Name(), err.Error())) + logger.Errorf(true, "Unable to execute command %s: %s", cmd.Name(), err.Error()) } } @@ -263,16 +263,16 @@ func handleConflictingParams(setFlags *pflag.FlagSet, args []string) error { } }) if repeat && len(args)+flagDiffCount > 1 { - return fmt.Errorf("Invalid Command. Usage: gauge run --repeat") + return errors.New("Invalid Command. Usage: gauge run --repeat") } if failed && len(args)+flagDiffCount > 1 { - return fmt.Errorf("Invalid Command. Usage: gauge run --failed") + return errors.New("Invalid Command. Usage: gauge run --failed") } if !parallel && tagsToFilterForParallelRun != "" { - return fmt.Errorf("Invalid Command. flag --only can be used only with --parallel") + return errors.New("Invalid Command. flag --only can be used only with --parallel") } if maxRetriesCount == 1 && retryOnlyTags != "" { - return fmt.Errorf("Invalid Command. flag --retry-only can be used only with --max-retry-count") + return errors.New("Invalid Command. flag --retry-only can be used only with --max-retry-count") } return nil } diff --git a/cmd/template.go b/cmd/template.go index e6da5c434..5649301ae 100644 --- a/cmd/template.go +++ b/cmd/template.go @@ -24,7 +24,7 @@ var ( if templateList || machineReadable { text, err := template.List(machineReadable) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } fmt.Println(text) return @@ -35,14 +35,14 @@ var ( if len(args) == 1 { text, err := template.Get(args[0]) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } - logger.Infof(true, text) + logger.Info(true, text) return } err := template.Update(args[0], args[1]) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } }, DisableAutoGenTag: true, diff --git a/env/env.go b/env/env.go index 2d4a9fe99..5c8c5cb6e 100644 --- a/env/env.go +++ b/env/env.go @@ -7,6 +7,7 @@ package env import ( + "errors" "fmt" "os" "path/filepath" @@ -236,7 +237,7 @@ func isCircular(key, value string) error { } _, err := properties.LoadString(fmt.Sprintf("%s=%s", key, value)) if err != nil { - return fmt.Errorf(err.Error()) + return errors.New(err.Error()) } } return nil diff --git a/execution/execute.go b/execution/execute.go index 03753ea84..665315a01 100644 --- a/execution/execute.go +++ b/execution/execute.go @@ -92,7 +92,7 @@ type executor interface { var ExecuteSpecs = func(specDirs []string) int { err := validateFlags() if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } if config.CheckUpdates() { i := &install.UpdateFacade{} diff --git a/execution/executionInfo.go b/execution/executionInfo.go index 2b936ec32..05d05f9af 100644 --- a/execution/executionInfo.go +++ b/execution/executionInfo.go @@ -29,7 +29,7 @@ type executionInfo struct { func newExecutionInfo(s *gauge.SpecCollection, r runner.Runner, ph plugin.Handler, e *gauge.BuildErrors, p bool, stream int) *executionInfo { m, err := manifest.ProjectManifest() if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } return &executionInfo{ manifest: m, diff --git a/execution/parallelExecution.go b/execution/parallelExecution.go index a47130dd3..a6447a0dd 100644 --- a/execution/parallelExecution.go +++ b/execution/parallelExecution.go @@ -202,7 +202,7 @@ func (e *parallelExecution) executeLegacyMultithreaded() { for i := 0; i < totalStreams; i++ { connection, err := handlers[i].AcceptConnection(config.RunnerConnectionTimeout(), make(chan error)) if err != nil { - logger.Errorf(true, err.Error()) + logger.Error(true, err.Error()) } crapRunner := &runner.MultithreadedRunner{} crapRunner.SetConnection(connection) diff --git a/execution/scenarioExecutor.go b/execution/scenarioExecutor.go index e546eb144..47d5a4224 100644 --- a/execution/scenarioExecutor.go +++ b/execution/scenarioExecutor.go @@ -103,7 +103,7 @@ func (e *scenarioExecutor) initScenarioDataStore() *gauge_messages.ProtoExecutio } func (e *scenarioExecutor) handleScenarioDataStoreFailure(scenarioResult *result.ScenarioResult, scenario *gauge.Scenario, err error) { - logger.Errorf(true, err.Error()) + logger.Error(true, err.Error()) validationError := validation.NewStepValidationError(&gauge.Step{LineNo: scenario.Heading.LineNo, LineText: scenario.Heading.Value}, err.Error(), e.currentExecutionInfo.CurrentSpec.GetFileName(), nil, "") e.errMap.ScenarioErrs[scenario] = []error{validationError} @@ -156,7 +156,7 @@ func (e *scenarioExecutor) notifyBeforeConceptHook(conceptResult *result.Scenari message := &gauge_messages.Message{MessageType: gauge_messages.Message_ConceptExecutionStarting, ConceptExecutionStartingRequest: &gauge_messages.ConceptExecutionStartingRequest{CurrentExecutionInfo: e.currentExecutionInfo, Stream: int32(e.stream)}} var res *gauge_messages.ProtoExecutionResult = nil - if (e.runner.Info().ConceptMessages) { + if e.runner.Info().ConceptMessages { res = e.runner.ExecuteAndGetStatus(message) conceptResult.ProtoScenario.PostHookMessages = res.Message conceptResult.ProtoScenario.PostHookScreenshotFiles = res.ScreenshotFiles @@ -173,7 +173,7 @@ func (e *scenarioExecutor) notifyAfterConceptHook(conceptResult *result.Scenario message := &gauge_messages.Message{MessageType: gauge_messages.Message_ConceptExecutionEnding, ConceptExecutionEndingRequest: &gauge_messages.ConceptExecutionEndingRequest{CurrentExecutionInfo: e.currentExecutionInfo, Stream: int32(e.stream)}} var res *gauge_messages.ProtoExecutionResult = nil - if (e.runner.Info().ConceptMessages) { + if e.runner.Info().ConceptMessages { res = e.runner.ExecuteAndGetStatus(message) conceptResult.ProtoScenario.PostHookMessages = res.Message conceptResult.ProtoScenario.PostHookScreenshotFiles = res.ScreenshotFiles @@ -217,9 +217,9 @@ func (e *scenarioExecutor) executeSteps(steps []*gauge.Step, protoItems []*gauge } } if scenarioResult.GetSkippedScenario() { - // The step execution resulted in SkipScenario. + // The step execution resulted in SkipScenario. // The rest of steps execution is skipped - break; + break } } } @@ -282,9 +282,9 @@ func (e *scenarioExecutor) executeConcept(item *gauge.Step, protoConcept *gauge_ return cptResult } if scenarioResult.GetSkippedScenario() { - // The step execution resulted in SkipScenario. + // The step execution resulted in SkipScenario. // The rest of steps execution is skipped - break; + break } } } @@ -297,7 +297,7 @@ func (e *scenarioExecutor) executeConcept(item *gauge.Step, protoConcept *gauge_ scenarioResult.SetFailure() cptResult.UpdateConceptExecResult() } - + return cptResult } diff --git a/execution/specExecutor.go b/execution/specExecutor.go index 0f878b099..69e9d9af9 100644 --- a/execution/specExecutor.go +++ b/execution/specExecutor.go @@ -201,7 +201,7 @@ func (e *specExecutor) notifyAfterSpecHook() { } func (e *specExecutor) skipSpecForError(err error) { - logger.Errorf(true, err.Error()) + logger.Error(true, err.Error()) validationError := validation.NewStepValidationError(&gauge.Step{LineNo: e.specification.Heading.LineNo, LineText: e.specification.Heading.Value}, err.Error(), e.specification.FileName, nil, "") for _, scenario := range e.specification.Scenarios { @@ -299,8 +299,8 @@ func (e *specExecutor) executeScenario(scenario *gauge.Scenario) (*result.Scenar Name: scenario.Heading.Value, Tags: getTagValue(scenario.Tags), IsFailed: false, - Retries: &gauge_messages.ScenarioRetriesInfo{ - MaxRetries: int32(MaxRetriesCount)-1, + Retries: &gauge_messages.ScenarioRetriesInfo{ + MaxRetries: int32(MaxRetriesCount) - 1, CurrentRetry: int32(retriesCount), }, } diff --git a/filter/filter.go b/filter/filter.go index 8f3e82147..761e79732 100644 --- a/filter/filter.go +++ b/filter/filter.go @@ -16,7 +16,7 @@ func FilterSpecs(specs []*gauge.Specification) []*gauge.Specification { if ExecuteTags != "" && len(specs) > 0 { logger.Debugf(true, "The following specifications satisfy filter criteria:") for _, s := range specs { - logger.Debugf(true, util.RelPathToProjectRoot(s.FileName)) + logger.Debug(true, util.RelPathToProjectRoot(s.FileName)) } } return specs diff --git a/filter/specItemFilter.go b/filter/specItemFilter.go index 7ce41d151..7fe537833 100644 --- a/filter/specItemFilter.go +++ b/filter/specItemFilter.go @@ -216,7 +216,7 @@ func validateTagExpression(tagExpression string) { filter.replaceSpecialChar() _, err := filter.formatAndEvaluateExpression(make(map[string]bool), func(a map[string]bool, b string) bool { return true }) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } } diff --git a/parser/conceptParser.go b/parser/conceptParser.go index 9364cacb0..a2a07fa08 100644 --- a/parser/conceptParser.go +++ b/parser/conceptParser.go @@ -271,7 +271,7 @@ func AddConcepts(conceptFiles []string, conceptDictionary *gauge.ConceptDictiona concepts, parseRes := new(ConceptParser).ParseFile(conceptFile) if parseRes != nil && parseRes.Warnings != nil { for _, warning := range parseRes.Warnings { - logger.Warningf(true, warning.String()) + logger.Warning(true, warning.String()) } } parseErrors, err := AddConcept(concepts, conceptFile, conceptDictionary) diff --git a/parser/parse.go b/parser/parse.go index 6a8537f6e..e1c831085 100644 --- a/parser/parse.go +++ b/parser/parse.go @@ -4,24 +4,26 @@ * See LICENSE in the project root for license information. *----------------------------------------------------------------*/ -/*Package parser parses all the specs in the list of directories given and also de-duplicates all specs passed through `specDirs` before parsing specs. - Gets all the specs files in the given directory and generates token for each spec file. - While parsing a concept file, concepts are inlined i.e. concept in the spec file is replaced with steps that concept has in the concept file. - While creating a specification file parser applies the converter functions. - Parsing a spec file gives a specification with parseresult. ParseResult contains ParseErrors, CriticalErrors, Warnings and FileName - - Errors can be generated, While - - Generating tokens - - Applying converters - - After Applying converters - - If a parse error is found in a spec, only that spec is ignored and others will continue execution. - This doesn't invoke the language runner. - Eg : Multiple spec headings found in same file. - Scenario should be defined after the spec heading. - - Critical error : - Circular reference of concepts - Doesn't parse specs becz it goes in recursion and crashes +/* +Package parser parses all the specs in the list of directories given and also de-duplicates all specs passed through `specDirs` before parsing specs. + + Gets all the specs files in the given directory and generates token for each spec file. + While parsing a concept file, concepts are inlined i.e. concept in the spec file is replaced with steps that concept has in the concept file. + While creating a specification file parser applies the converter functions. + Parsing a spec file gives a specification with parseresult. ParseResult contains ParseErrors, CriticalErrors, Warnings and FileName + + Errors can be generated, While + - Generating tokens + - Applying converters + - After Applying converters + + If a parse error is found in a spec, only that spec is ignored and others will continue execution. + This doesn't invoke the language runner. + Eg : Multiple spec headings found in same file. + Scenario should be defined after the spec heading. + + Critical error : + Circular reference of concepts - Doesn't parse specs becz it goes in recursion and crashes */ package parser @@ -129,7 +131,7 @@ func parseSpec(specFile string, conceptDictionary *gauge.ConceptDictionary) (*ga } spec, parseResult, err := new(SpecParser).Parse(specFileContent, conceptDictionary, specFile) if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } return spec, parseResult } @@ -278,7 +280,7 @@ func HandleParseResult(results ...*ParseResult) bool { for _, result := range results { if !result.Ok { for _, err := range result.Errors() { - logger.Errorf(true, err) + logger.Error(true, err) } failed = true } diff --git a/plugin/install/check.go b/plugin/install/check.go index 2a51576af..0aa02c723 100644 --- a/plugin/install/check.go +++ b/plugin/install/check.go @@ -43,10 +43,10 @@ func PrintUpdateInfoWithDetails() { updates := checkUpdates() if len(updates) > 0 { for _, update := range updates { - logger.Infof(true, fmt.Sprintf("%-10s\t\t%-10s\t%s", update.Name, update.CompatibleVersion, update.Message)) + logger.Infof(true, "%-10s\t\t%-10s\t%s", update.Name, update.CompatibleVersion, update.Message) } } else { - logger.Infof(true, "No Updates available.") + logger.Info(true, "No Updates available.") } } @@ -76,7 +76,7 @@ func waitToPrint(messageChan chan string, printChan chan bool, message string, w select { case <-printChan: if message != "" { - logger.Infof(true, message) + logger.Info(true, message) } wg.Done() case message = <-messageChan: diff --git a/plugin/install/install.go b/plugin/install/install.go index 60c615509..83b6fe71b 100644 --- a/plugin/install/install.go +++ b/plugin/install/install.go @@ -511,7 +511,7 @@ func getRunnerJSONContents(file string) (*runner.RunnerInfo, error) { func AllPlugins(silent, languageOnly bool) { manifest, err := manifest.ProjectManifest() if err != nil { - logger.Fatalf(true, err.Error()) + logger.Fatal(true, err.Error()) } installPluginsFromManifest(manifest, silent, languageOnly) } @@ -521,7 +521,7 @@ func UpdatePlugins(silent bool) { var failedPlugin []string pluginInfos, err := pluginInfo.GetPluginsInfo() if err != nil { - logger.Infof(true, err.Error()) + logger.Info(true, err.Error()) os.Exit(0) } for _, pluginInfo := range pluginInfos { @@ -534,17 +534,17 @@ func UpdatePlugins(silent bool) { if len(failedPlugin) > 0 { logger.Fatalf(true, "Failed to update '%s' plugins.", strings.Join(failedPlugin, ", ")) } - logger.Infof(true, "Successfully updated all the plugins.") + logger.Info(true, "Successfully updated all the plugins.") } // HandleInstallResult handles the result of plugin Installation // TODO: Merge both HandleInstallResult and HandleUpdateResult, eliminate boolean exitIfFailure func HandleInstallResult(result InstallResult, pluginName string, exitIfFailure bool) bool { if result.Info != "" { - logger.Debugf(true, result.Info) + logger.Debug(true, result.Info) } if result.Warning != "" { - logger.Warningf(true, result.Warning) + logger.Warning(true, result.Warning) } if result.Skipped { return true @@ -571,10 +571,10 @@ func HandleInstallResult(result InstallResult, pluginName string, exitIfFailure // HandleUpdateResult handles the result of plugin Installation func HandleUpdateResult(result InstallResult, pluginName string, exitIfFailure bool) bool { if result.Info != "" { - logger.Debugf(true, result.Info) + logger.Debug(true, result.Info) } if result.Warning != "" { - logger.Warningf(true, result.Warning) + logger.Warning(true, result.Warning) } if result.Skipped { logger.Infof(true, "Plugin '%s' is up to date.", pluginName) diff --git a/projectInit/init.go b/projectInit/init.go index 85fead2af..b44d80f3f 100644 --- a/projectInit/init.go +++ b/projectInit/init.go @@ -146,11 +146,11 @@ func Template(name string, silent bool) { func fromTemplateName(templateName string, silent bool) { templateURL, err := template.Get(templateName) if err != nil { - logger.Fatalf(true, fmt.Errorf("Failed to initialize project. %w", err).Error()) + logger.Fatal(true, fmt.Errorf("Failed to initialize project. %w", err).Error()) } checkURL(templateURL) if err := initializeTemplate(templateURL); err != nil { - logger.Fatalf(true, fmt.Errorf("Failed to initialize project. %w", err).Error()) + logger.Fatal(true, fmt.Errorf("Failed to initialize project. %w", err).Error()) } installRunner(silent) } diff --git a/runner/grpcRunner.go b/runner/grpcRunner.go index a48b9d91c..950b1ccc3 100644 --- a/runner/grpcRunner.go +++ b/runner/grpcRunner.go @@ -321,7 +321,7 @@ func StartGrpcRunner(m *manifest.Manifest, stdout, stderr io.Writer, timeout tim err = cmd.Wait() if err != nil { e := fmt.Errorf("Error occurred while waiting for runner process to finish.\nError : %w", err) - logger.Errorf(true, e.Error()) + logger.Error(true, e.Error()) errChan <- e } errChan <- nil diff --git a/runner/legacyRunner.go b/runner/legacyRunner.go index 2cedf9391..93ddb1e00 100644 --- a/runner/legacyRunner.go +++ b/runner/legacyRunner.go @@ -136,13 +136,13 @@ func (r *LegacyRunner) ExecuteAndGetStatus(message *gauge_messages.Message) *gau executionResult := response.GetExecutionStatusResponse().GetExecutionResult() if executionResult == nil { errMsg := "ProtoExecutionResult obtained is nil" - logger.Errorf(true, errMsg) + logger.Error(true, errMsg) return errorResult(errMsg) } return executionResult } errMsg := fmt.Sprintf("Expected ExecutionStatusResponse. Obtained: %s", response.GetMessageType()) - logger.Errorf(true, errMsg) + logger.Error(true, errMsg) return errorResult(errMsg) } diff --git a/skel/plugin.go b/skel/plugin.go index eee8ef55b..37b7fe4ed 100644 --- a/skel/plugin.go +++ b/skel/plugin.go @@ -40,7 +40,7 @@ func getPluginsToInstall() (plugins []string) { func installPlugins(plugins []string, silent bool) { if len(plugins) > 0 { - logger.Infof(true, "Installing required plugins.") + logger.Info(true, "Installing required plugins.") } for _, p := range plugins { installPlugin(p, silent) @@ -51,7 +51,7 @@ func installPlugin(name string, silent bool) { logger.Debugf(true, "Installing plugin '%s'", name) res := install.Plugin(name, "", silent) if res.Error != nil { - logger.Debugf(true, res.Error.Error()) + logger.Debug(true, res.Error.Error()) } else if res.Version != "" { logger.Infof(true, "Successfully installed plugin '%s' version %s", name, res.Version) } else { diff --git a/util/fileUtils.go b/util/fileUtils.go index 913f11995..268f769aa 100644 --- a/util/fileUtils.go +++ b/util/fileUtils.go @@ -148,7 +148,7 @@ func IsDir(path string) bool { } var exitWithMessage = func(message string) { - logger.Errorf(true, message) + logger.Error(true, message) os.Exit(1) } diff --git a/util/rlimitUtil.go b/util/rlimitUtil.go index 694b6981a..b17f72a0d 100644 --- a/util/rlimitUtil.go +++ b/util/rlimitUtil.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows /*---------------------------------------------------------------- * Copyright (c) ThoughtWorks, Inc. diff --git a/validation/suggest.go b/validation/suggest.go index 356ef1bb8..cb9cc4aba 100644 --- a/validation/suggest.go +++ b/validation/suggest.go @@ -20,10 +20,10 @@ var message = map[gm.StepValidateResponse_ErrorType]string{ func showSuggestion(validationErrors validationErrors) { if !HideSuggestion { for t, errs := range groupErrors(validationErrors) { - logger.Infof(true, getSuggestionMessage(t)) + logger.Info(true, getSuggestionMessage(t)) suggestions := filterDuplicateSuggestions(errs) for _, suggestion := range suggestions { - logger.Infof(true, suggestion) + logger.Info(true, suggestion) } } } diff --git a/version/version.go b/version/version.go index 370ef02e9..7a649b450 100644 --- a/version/version.go +++ b/version/version.go @@ -14,7 +14,7 @@ import ( ) // CurrentGaugeVersion represents the current version of Gauge -var CurrentGaugeVersion = &Version{1, 6, 7} +var CurrentGaugeVersion = &Version{1, 6, 8} // BuildMetadata represents build information of current release (e.g, nightly build information) var BuildMetadata = ""