Skip to content

Commit

Permalink
drop react refresh packages for now
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtarsi committed Apr 12, 2024
1 parent b15c9a9 commit 1d174a0
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 120 deletions.
6 changes: 2 additions & 4 deletions packages/selenium-ide/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selenium-ide",
"version": "4.0.1-beta.5",
"version": "4.0.1-beta.6",
"private": false,
"description": "Selenium IDE electron app",
"author": "Todd <[email protected]>",
Expand Down Expand Up @@ -117,7 +117,6 @@
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.15.13",
"@mui/material": "^5.15.13",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@seleniumhq/code-export-csharp-nunit": "^4.0.3",
"@seleniumhq/code-export-csharp-xunit": "^4.0.3",
"@seleniumhq/code-export-java-junit": "^4.0.3",
Expand All @@ -128,7 +127,7 @@
"@seleniumhq/side-api": "^4.0.6",
"@seleniumhq/side-commons": "^4.0.1",
"@seleniumhq/side-model": "^4.0.1",
"@seleniumhq/side-runtime": "^4.0.5",
"@seleniumhq/side-runtime": "^4.0.6",
"dnd-core": "^16.0.1",
"electron-chromedriver": "^28.0.0",
"electron-log": "^5.1.0",
Expand Down Expand Up @@ -167,7 +166,6 @@
"html-webpack-plugin": "^5.5.3",
"mini-css-extract-plugin": "^2.7.6",
"npm-run-all": "^4.1.5",
"react-refresh-typescript": "^2.0.9",
"run-script-os": "^1.1.6",
"source-map-loader": "^4.0.1",
"source-map-support": "^0.5.21",
Expand Down
9 changes: 0 additions & 9 deletions packages/selenium-ide/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin'
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'
import fs from 'fs'
import CopyWebpackPlugin from 'copy-webpack-plugin'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import kebabCase from 'lodash/fp/kebabCase'
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import path from 'path'
// eslint-disable-next-line node/no-unpublished-import
import ReactRefreshTypeScript from 'react-refresh-typescript'
import {
Configuration,
SourceMapDevToolPlugin,
Expand All @@ -29,9 +26,6 @@ const commonPlugins: WebpackPluginInstance[] = [
if (isProduction) {
commonPlugins.push(new MiniCssExtractPlugin())
}
if (useHMR) {
commonPlugins.push(new ReactRefreshWebpackPlugin())
}

const commonConfig: Pick<
Configuration,
Expand All @@ -55,9 +49,6 @@ const commonConfig: Pick<
// eslint-disable-next-line node/no-unpublished-require
loader: require.resolve('ts-loader'),
options: {
getCustomTransformers: () => ({
before: [useHMR && ReactRefreshTypeScript()].filter(Boolean),
}),
transpileOnly: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/side-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@seleniumhq/browser-info": "^4.0.1",
"@seleniumhq/get-driver": "^4.0.1",
"@seleniumhq/side-model": "^4.0.1",
"@seleniumhq/side-runtime": "^4.0.5",
"@seleniumhq/side-runtime": "^4.0.6",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/side-code-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"types": "dist/index.d.ts",
"dependencies": {
"@seleniumhq/side-model": "^4.0.1",
"@seleniumhq/side-runtime": "^4.0.5",
"@seleniumhq/side-runtime": "^4.0.6",
"commander": "^9.4.0"
},
"gitHead": "f58e327e7616e23a3e926e4b80cf9952164e5744"
Expand Down
4 changes: 2 additions & 2 deletions packages/side-runner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selenium-side-runner",
"version": "4.0.4",
"version": "4.0.5",
"private": false,
"description": "Run Selenium IDE projects in cli",
"repository": "https://github.com/SeleniumHQ/selenium-ide",
Expand All @@ -24,7 +24,7 @@
"license": "Apache-2.0",
"dependencies": {
"@seleniumhq/side-model": "^4.0.1",
"@seleniumhq/side-runtime": "^4.0.5",
"@seleniumhq/side-runtime": "^4.0.6",
"commander": "^11.0.0",
"glob": "^10.3.1",
"jest": "^29.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/side-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seleniumhq/side-runtime",
"version": "4.0.5",
"version": "4.0.6",
"private": false,
"description": "Selenium IDE playback and execution",
"author": "Tomer <[email protected]>",
Expand Down
13 changes: 12 additions & 1 deletion packages/side-runtime/src/webdriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,18 @@ export default class WebDriverExecutor {
const { browserName, ...capabilities } = this
.capabilities as ExpandedCapabilities
try {
const driver = await this.getDriverSync({ debug, logger })
const driver = await new Promise<
Awaited<ReturnType<typeof this.getDriverSync>>
>((resolve, reject) => {
setTimeout(() => {
reject(
new Error(
'Driver took too long to build. This is likely an issue with the browser or driver.'
)
)
}, 30000)
this.getDriverSync({ debug, logger }).then(resolve, reject)
})
debug && logger.info('Driver has been built for ' + browserName)
return driver
} catch (e) {
Expand Down
Loading

0 comments on commit 1d174a0

Please sign in to comment.