Skip to content

Installing npm packages support win10 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b06c3c5
adding package.json into template and archive
suryart May 5, 2020
de1ee12
Updating readme with package.json instructions and callbackURL
suryart May 5, 2020
25a7b41
Adding config template with cypress dependencies as key in browsersta…
suryart May 8, 2020
48c544c
removed packagejson path and added cypress_dependencies to the document
suryart May 8, 2020
b8a4625
changing cypress_dependencies to npm_dependencies
suryart May 8, 2020
59f7ba3
send npm_dependencies to archiver
suryart May 8, 2020
e65dd49
remove unncessary require
suryart May 8, 2020
cc04cbf
fix - archive the package.json before finalize()
suryart May 11, 2020
8b5e5d4
adding missing semicolon
suryart May 11, 2020
767a4fa
reverting update config command, moving npm_dependencies to run settings
suryart May 13, 2020
f8797a7
fixing incorrect JSON object
suryart May 13, 2020
0e25691
fix package-lock.json to not being included in the tests.zip
suryart May 14, 2020
00ba670
ignore existing package.json as well
suryart May 15, 2020
8406d63
changing the package.json to browserstack-package.json
suryart May 15, 2020
e82dfc5
reverting constants for update-config command
suryart May 15, 2020
ff1c23a
reverting the readme doc
suryart May 15, 2020
0967891
reverting the readme doc
suryart May 15, 2020
eafe7ae
Merge branch 'master' into npm-package-support-win10
suryart May 15, 2020
36bd965
Merge branch 'master' of github.com:browserstack/browserstack-cypress…
suryart May 15, 2020
f23ae64
ignore browserstack-package.json file
suryart May 18, 2020
acc919f
add npm dependencies only when it is provided in config
suryart May 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Here are all the options that you can provide in the `browserstack.json`:
### Authentication

You can use the `auth` option to specify your username and access keys. You
can find them in your [Automate dashboard](https://automate.browserstack.com/)
can find them in your [Automate dashboard](https://automate.browserstack.com/)

| Option | Description | Possible values |
| ------------ | ----------------------------- | --------------- |
Expand Down
10 changes: 8 additions & 2 deletions bin/helpers/archiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const archiveSpecs = (runSettings, filePath) => {
return new Promise(function (resolve, reject) {
var output = fs.createWriteStream(filePath);

var cypressFolderPath = runSettings.cypress_proj_dir
var cypressFolderPath = runSettings.cypress_proj_dir;

var archive = archiver('zip', {
zlib: { level: 9 } // Sets the compression level.
Expand Down Expand Up @@ -36,11 +36,17 @@ const archiveSpecs = (runSettings, filePath) => {

archive.pipe(output);


let allowedFileTypes = [ 'js', 'json', 'txt', 'ts' ]
allowedFileTypes.forEach(fileType => {
archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: 'node_modules/**' });
archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: ['node_modules/**', 'package-lock.json', 'package.json', 'browserstack-package.json'] });
});

if (typeof runSettings.npm_dependencies === 'object') {
var packageJSON = JSON.stringify({devDependencies: runSettings.npm_dependencies}, null, 4);
archive.append(packageJSON, { name: 'browserstack-package.json' });
}

archive.finalize();
});
}
Expand Down
4 changes: 3 additions & 1 deletion bin/templates/configTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ module.exports = function () {
"run_settings": {
"cypress_proj_dir" : "/path/to/cypress.json",
"project_name": "project-name",
"build_name": "build-name"
"build_name": "build-name",
"npm_dependencies": {
}
},
"connection_settings": {
"local": false,
Expand Down