New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sap_oss/wdio-qmate-service

Package Overview
Dependencies
Maintainers
22
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap_oss/wdio-qmate-service - npm Package Compare versions

Comparing version 2.4.2 to 2.5.0

test/reuse/util/file/getFileNamesByExtensions.spec.js

10

lib/reuse/modules/util/file.d.ts

@@ -114,2 +114,12 @@ /// <reference types="node" />

findFilePathRecursively(directory: string, fileName: string): Promise<any>;
/**
* @function getFileNamesByExtensions
* @memberof util.file
* @description - Returns the filename/s of the given directory filtered by the given extensions.
* @param {string} dirPath - The path to the directory.
* @param {string | string[]} fileExtensions - The file extension as string or multiple as string array.
* @example const fileName = await util.file.getFileNamesByExtensions("regression/downloads", "xml");
* const fileNames = await util.file.getFileNamesByExtensions("regression/downloads", "["xml", "txt"]");
*/
getFileNamesByExtensions(dirPath: string, fileExtensions: string | string[]): string[];
private _renderPage;

@@ -116,0 +126,0 @@ private _convertSheet;

@@ -315,2 +315,22 @@ "use strict";

}
// =================================== FILENAME ===================================
/**
* @function getFileNamesByExtensions
* @memberof util.file
* @description - Returns the filename/s of the given directory filtered by the given extensions.
* @param {string} dirPath - The path to the directory.
* @param {string | string[]} fileExtensions - The file extension as string or multiple as string array.
* @example const fileName = await util.file.getFileNamesByExtensions("regression/downloads", "xml");
* const fileNames = await util.file.getFileNamesByExtensions("regression/downloads", "["xml", "txt"]");
*/
getFileNamesByExtensions(dirPath, fileExtensions) {
const files = fs.readdirSync(dirPath);
if (!Array.isArray(fileExtensions)) {
fileExtensions = [fileExtensions];
}
return files.filter((file) => {
const extension = path.extname(file).toLowerCase();
return fileExtensions.some((ext) => ext.toLowerCase() === extension.slice(1));
});
}
// =================================== HELPER ===================================

@@ -317,0 +337,0 @@ async _renderPage(pageData) {

2

package.json
{
"name": "@sap_oss/wdio-qmate-service",
"version": "2.4.2",
"version": "2.5.0",
"author": "SAP SE",

@@ -5,0 +5,0 @@ "types": "./@types/index.d.ts",

const merge = require("deepmerge");
const baseConfig = require("./base.conf.js");
const path = require("path");

@@ -32,3 +33,4 @@ exports.config = merge(baseConfig.config, {

password_manager_enabled: false,
"intl.accept_languages": "en,en_US"
"intl.accept_languages": "en,en_US",
"download.default_directory": path.join(process.cwd(), "downloads")
}

@@ -35,0 +37,0 @@ }

@@ -12,5 +12,4 @@ const path = require("path");

specs: [
path.resolve(__dirname, "upload.spec.js"),
path.resolve(__dirname, "pdfParser.spec.js"),
path.resolve(__dirname, "getExcelData.spec.js"),
path.resolve(__dirname, "pdfParser.spec.js"),
path.resolve(__dirname, "getExcelData.spec.js"),
path.resolve(__dirname, "findFilePathRecursively.spec.js"),

@@ -20,4 +19,5 @@ path.resolve(__dirname, "getXmlData.spec.js"),

path.resolve(__dirname, "getTextData.spec.js"),
path.resolve(__dirname, "expectTextDataToContain.spec.js")
path.resolve(__dirname, "expectTextDataToContain.spec.js"),
path.resolve(__dirname, "getFileNamesByExtensions.spec.js")
]
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc