Skip to content

Commit

Permalink
chore: address potential security vulns in dependencies (#827)
Browse files Browse the repository at this point in the history
* remove wdio-native-app-compare-service dep

* upgrade typedoc

* remove release-it dep

* remove appium-doctor, force axios to 0.21.2

* upgrade webdriver
  • Loading branch information
charliecruzan-stripe authored Feb 25, 2022
1 parent 24bd62d commit 7fa5fcc
Show file tree
Hide file tree
Showing 6 changed files with 2,049 additions and 3,761 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ dist/

# Docs
docs/api-reference/

# Appium Screenshots
.tmp/screenshots
25 changes: 10 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"docs": "yarn typedoc ./src/index.tsx --out ./docs/api-reference --tsconfig ./tsconfig.json --theme minimal --theme ./docs/stripe-theme",
"run-example-ios": "cd example;ENVFILE=.env.ci react-native run-ios --configuration Release --simulator \"iPhone 12\"",
"run-example-android": "cd example;ENVFILE=.env.ci react-native run-android --variant=release",
"test:ios": "node ./run-appium-tests.js ios",
"test:android": "node ./run-appium-tests.js android"
"test:ios": "mkdir -p .tmp/screenshots && node ./run-appium-tests.js ios",
"test:android": "mkdir -p .tmp/screenshots && node ./run-appium-tests.js android"
},
"keywords": [
"react-native",
Expand All @@ -49,20 +49,17 @@
"@babel/plugin-transform-typescript": "^7.13.0",
"@react-native-community/bob": "^0.16.2",
"@react-native-community/eslint-config": "^2.0.0",
"@release-it/conventional-changelog": "^1.1.4",
"@types/jest": "^26.0.23",
"@types/react": "^16.9.19",
"@types/react-native": "0.62.13",
"@types/webdriverio": "^5.0.0",
"@wdio/appium-service": "^7.5.7",
"@wdio/cli": "^7.5.7",
"@wdio/local-runner": "^7.5.7",
"@wdio/mocha-framework": "^7.5.3",
"@wdio/spec-reporter": "^7.5.7",
"@wdio/sync": "^7.5.7",
"@wdio/cli": "^7.16.15",
"@wdio/local-runner": "^7.16.15",
"@wdio/mocha-framework": "^7.16.15",
"@wdio/spec-reporter": "^7.16.14",
"@wdio/sync": "^7.16.15",
"appium": "^1.22.1",
"appium-chromedriver": "4.26.2",
"appium-doctor": "^1.16.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
Expand All @@ -75,13 +72,11 @@
"prettier": "^2.0.5",
"react": "17.0.2",
"react-native": "0.66.4",
"release-it": "^13.5.8",
"ts-node": "^9.1.1",
"typedoc": "^0.21.5",
"typescript": "^4.2.3",
"typedoc": "^0.22.12",
"typescript": "~4.2.3",
"wdio-chromedriver-service": "^7.0.0",
"wdio-native-app-compare-service": "^1.2.0",
"webdriverio": "^7.5.7"
"webdriverio": "^7.16.15"
},
"peerDependencies": {
"react": "*",
Expand Down
21 changes: 3 additions & 18 deletions wdio.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,7 @@ exports.config = {
waitforTimeout: 8000,
connectionRetryTimeout: 200000,
connectionRetryCount: 4,
services: [
'appium',
[
'native-app-compare',
{
baselineFolder: 'test/baseline',
formatImageName: '{tag}-{logName}-{width}x{height}',
screenshotPath: '.tmp/',
savePerInstance: true,
autoSaveBaseline: true,
blockOutStatusBar: true,
blockOutToolBar: true,
isHybridApp: true,
},
],
],
services: ['appium'],
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
Expand All @@ -64,8 +49,8 @@ exports.config = {
],
afterTest: function (test, _context, { passed }) {
if (!passed) {
driver.saveScreen(
test.title.replace(/\s+/g, '') + '-' + new Date().getTime()
driver.saveScreenshot(
'.tmp/screenshots/' + test.title.replace(/\s+/g, '') + '-android.png'
);
}
},
Expand Down
17 changes: 1 addition & 16 deletions wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,7 @@ module.exports = {
waitforTimeout: 8000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: [
'appium',
[
'native-app-compare',
{
baselineFolder: 'test/baseline',
formatImageName: '{tag}-{logName}-{width}x{height}',
screenshotPath: '.tmp/',
savePerInstance: true,
autoSaveBaseline: true,
blockOutStatusBar: true,
blockOutToolBar: true,
isHybridApp: true,
},
],
],
services: ['appium'],
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
Expand Down
21 changes: 3 additions & 18 deletions wdio.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,7 @@ exports.config = {
waitforTimeout: 8000,
connectionRetryTimeout: 200000,
connectionRetryCount: 3,
services: [
'appium',
[
'native-app-compare',
{
baselineFolder: 'test/baseline',
formatImageName: '{tag}-{logName}-{width}x{height}',
screenshotPath: '.tmp/',
savePerInstance: true,
autoSaveBaseline: true,
blockOutStatusBar: true,
blockOutToolBar: true,
isHybridApp: true,
},
],
],
services: ['appium'],
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
Expand All @@ -60,8 +45,8 @@ exports.config = {
],
afterTest: function (test, _context, { passed }) {
if (!passed) {
driver.saveScreen(
test.title.replace(/\s+/g, '') + '-' + new Date().getTime()
driver.saveScreenshot(
'.tmp/screenshots/' + test.title.replace(/\s+/g, '') + '-ios.png'
);
}
},
Expand Down
Loading

0 comments on commit 7fa5fcc

Please sign in to comment.