webdriver-installer 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/edge.js +13 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ### [1.1.3](https://github.com/joeyparrish/webdriver-installer/compare/v1.1.2...v1.1.3) (2022-02-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Choose platform-specific msedgedriver version ([#8](https://github.com/joeyparrish/webdriver-installer/issues/8)) ([2e0e859](https://github.com/joeyparrish/webdriver-installer/commit/2e0e8598f878c0c3fcd8ed55d4e830da398a891b))
9
+
10
+
3
11
  ### [1.1.2](https://github.com/joeyparrish/webdriver-installer/compare/v1.1.1...v1.1.2) (2022-02-03)
4
12
 
5
13
 
package/edge.js CHANGED
@@ -64,7 +64,19 @@ class EdgeWebDriverInstaller extends WebDriverInstallerBase {
64
64
  */
65
65
  async getBestDriverVersion(browserVersion) {
66
66
  const majorVersion = browserVersion.split('.')[0];
67
- const versionUrl = `${CDN_URL}/LATEST_RELEASE_${majorVersion}`;
67
+
68
+ let platform;
69
+ if (os.platform() == 'linux') {
70
+ platform = 'LINUX';
71
+ } else if (os.platform() == 'darwin') {
72
+ platform = 'MACOS';
73
+ } else if (os.platform() == 'win32') {
74
+ platform = 'WINDOWS';
75
+ } else {
76
+ throw new Error(`Unrecognized platform: ${os.platform()}`);
77
+ }
78
+
79
+ const versionUrl = `${CDN_URL}/LATEST_RELEASE_${majorVersion}_${platform}`;
68
80
  return await InstallerUtils.fetchVersionUrl(versionUrl, 'UTF-16LE');
69
81
  }
70
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdriver-installer",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Install the right WebDriver version for your local browsers, automatically.",
5
5
  "main": "main.js",
6
6
  "bin": {