From e7d1669fb5ada4025ca3172851af38a65415cbc6 Mon Sep 17 00:00:00 2001 From: Karan Shah Date: Mon, 2 Nov 2020 14:20:47 +0530 Subject: [PATCH 1/3] Allowing .npmrc files on browserstack cli . --- bin/helpers/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/helpers/constants.js b/bin/helpers/constants.js index 0f89948a..03de800d 100644 --- a/bin/helpers/constants.js +++ b/bin/helpers/constants.js @@ -87,7 +87,7 @@ const messageTypes = { NULL: null } -const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip']; +const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip', 'npmrc']; const filesToIgnoreWhileUploading = ['node_modules/**', 'package-lock.json', 'package.json', 'browserstack-package.json', 'tests.zip', 'cypress.json'] From dd96324ed15fbd3957650b97e807fd9e6d482f2b Mon Sep 17 00:00:00 2001 From: Karan Shah Date: Mon, 2 Nov 2020 18:22:12 +0530 Subject: [PATCH 2/3] Include .npmrc bug fixes --- bin/helpers/archiver.js | 2 ++ bin/helpers/constants.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/helpers/archiver.js b/bin/helpers/archiver.js index 4ffcccd1..5a1970a2 100644 --- a/bin/helpers/archiver.js +++ b/bin/helpers/archiver.js @@ -45,6 +45,8 @@ const archiveSpecs = (runSettings, filePath, excludeFiles) => { archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: ignoreFiles }); }); + archive.file(".npmrc"); + let packageJSON = {}; if (typeof runSettings.package_config_options === 'object') { diff --git a/bin/helpers/constants.js b/bin/helpers/constants.js index 03de800d..0f89948a 100644 --- a/bin/helpers/constants.js +++ b/bin/helpers/constants.js @@ -87,7 +87,7 @@ const messageTypes = { NULL: null } -const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip', 'npmrc']; +const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip']; const filesToIgnoreWhileUploading = ['node_modules/**', 'package-lock.json', 'package.json', 'browserstack-package.json', 'tests.zip', 'cypress.json'] From c558aa483ecf95cf9162808f475f8389d177023e Mon Sep 17 00:00:00 2001 From: Karan Shah Date: Mon, 2 Nov 2020 18:32:58 +0530 Subject: [PATCH 3/3] Bug fixes for npmrc support --- bin/helpers/archiver.js | 4 +--- bin/helpers/constants.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/helpers/archiver.js b/bin/helpers/archiver.js index 5a1970a2..e91e6d67 100644 --- a/bin/helpers/archiver.js +++ b/bin/helpers/archiver.js @@ -42,11 +42,9 @@ const archiveSpecs = (runSettings, filePath, excludeFiles) => { let ignoreFiles = getFilesToIgnore(runSettings, excludeFiles); Constants.allowedFileTypes.forEach(fileType => { - archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: ignoreFiles }); + archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: ignoreFiles, dot:true }); }); - archive.file(".npmrc"); - let packageJSON = {}; if (typeof runSettings.package_config_options === 'object') { diff --git a/bin/helpers/constants.js b/bin/helpers/constants.js index 0f89948a..03de800d 100644 --- a/bin/helpers/constants.js +++ b/bin/helpers/constants.js @@ -87,7 +87,7 @@ const messageTypes = { NULL: null } -const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip']; +const allowedFileTypes = ['js', 'json', 'txt', 'ts', 'feature', 'features', 'pdf', 'jpg', 'jpeg', 'png', 'zip', 'npmrc']; const filesToIgnoreWhileUploading = ['node_modules/**', 'package-lock.json', 'package.json', 'browserstack-package.json', 'tests.zip', 'cypress.json']