Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions common/manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ package(
"//dotnet/src/webdriver:__pkg__",
"//dotnet/test/common:__pkg__",
"//java/src/org/openqa/selenium/manager:__pkg__",
"//javascript/selenium-manager-darwin:__pkg__",
"//javascript/selenium-manager-linux-x64:__pkg__",
"//javascript/selenium-manager-win32:__pkg__",
"//javascript/selenium-webdriver:__pkg__",
"//py:__pkg__",
"//py/selenium-manager-linux-x86-64:__pkg__",
"//py/selenium-manager-macos:__pkg__",
"//py/selenium-manager-windows:__pkg__",
"//rb:__pkg__",
],
)
Expand Down
34 changes: 34 additions & 0 deletions javascript/selenium-manager-darwin/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("//common:defs.bzl", "copy_file")

SM_VERSION = "4.45.0"

copy_file(
name = "manager-binary",
src = "//common/manager:selenium-manager-macos",
out = "bin/selenium-manager",
)

genrule(
name = "license",
srcs = ["//:license"],
outs = [
"LICENSE",
"NOTICE",
],
cmd = "cp $(locations //:license) $(@D)",
)

npm_package(
name = "selenium-manager-darwin",
srcs = [
"package.json",
":license",
":manager-binary",
],
package = "@selenium/manager-darwin",
publishable = True,
tags = ["release-artifact"],
version = SM_VERSION,
visibility = ["//visibility:public"],
)
28 changes: 28 additions & 0 deletions javascript/selenium-manager-darwin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@selenium/manager-darwin",
"version": "4.45.0",
"description": "Selenium Manager binary for macOS (universal binary, x64 + arm64)",
"license": "Apache-2.0",
"os": ["darwin"],
"homepage": "https://github.com/SeleniumHQ/selenium/tree/trunk/javascript/selenium-manager#readme",
"bugs": {
"url": "https://github.com/SeleniumHQ/selenium/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/SeleniumHQ/selenium.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/SeleniumHQ"
},
{
"type": "opencollective",
"url": "https://opencollective.com/selenium"
}
]
}
34 changes: 34 additions & 0 deletions javascript/selenium-manager-linux-x64/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("//common:defs.bzl", "copy_file")

SM_VERSION = "4.45.0"

copy_file(
name = "manager-binary",
src = "//common/manager:selenium-manager-linux",
out = "bin/selenium-manager",
)

genrule(
name = "license",
srcs = ["//:license"],
outs = [
"LICENSE",
"NOTICE",
],
cmd = "cp $(locations //:license) $(@D)",
)

npm_package(
name = "selenium-manager-linux-x64",
srcs = [
"package.json",
":license",
":manager-binary",
],
package = "@selenium/manager-linux-x64",
publishable = True,
tags = ["release-artifact"],
version = SM_VERSION,
visibility = ["//visibility:public"],
)
29 changes: 29 additions & 0 deletions javascript/selenium-manager-linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@selenium/manager-linux-x64",
"version": "4.45.0",
"description": "Selenium Manager binary for Linux x64",
"license": "Apache-2.0",
"os": ["linux"],
"cpu": ["x64"],
"homepage": "https://github.com/SeleniumHQ/selenium/tree/trunk/javascript/selenium-manager#readme",
"bugs": {
"url": "https://github.com/SeleniumHQ/selenium/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/SeleniumHQ/selenium.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/SeleniumHQ"
},
{
"type": "opencollective",
"url": "https://opencollective.com/selenium"
}
]
}
34 changes: 34 additions & 0 deletions javascript/selenium-manager-win32/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("//common:defs.bzl", "copy_file")

SM_VERSION = "4.45.0"

copy_file(
name = "manager-binary",
src = "//common/manager:selenium-manager-windows",
out = "bin/selenium-manager.exe",
)

genrule(
name = "license",
srcs = ["//:license"],
outs = [
"LICENSE",
"NOTICE",
],
cmd = "cp $(locations //:license) $(@D)",
)

npm_package(
name = "selenium-manager-win32",
srcs = [
"package.json",
":license",
":manager-binary",
],
package = "@selenium/manager-win32",
publishable = True,
tags = ["release-artifact"],
version = SM_VERSION,
visibility = ["//visibility:public"],
)
28 changes: 28 additions & 0 deletions javascript/selenium-manager-win32/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@selenium/manager-win32",
"version": "4.45.0",
"description": "Selenium Manager binary for Windows (ia32 + x64)",
"license": "Apache-2.0",
"os": ["win32"],
"homepage": "https://github.com/SeleniumHQ/selenium/tree/trunk/javascript/selenium-manager#readme",
"bugs": {
"url": "https://github.com/SeleniumHQ/selenium/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/SeleniumHQ/selenium.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/SeleniumHQ"
},
{
"type": "opencollective",
"url": "https://opencollective.com/selenium"
}
]
}
27 changes: 27 additions & 0 deletions javascript/selenium-manager/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")

SM_VERSION = "4.45.0"

genrule(
name = "license",
srcs = ["//:license"],
outs = [
"LICENSE",
"NOTICE",
],
cmd = "cp $(locations //:license) $(@D)",
)

npm_package(
name = "selenium-manager",
srcs = [
"bin/selenium-manager.js",
"package.json",
":license",
],
package = "@selenium/manager",
publishable = True,
tags = ["release-artifact"],
version = SM_VERSION,
visibility = ["//visibility:public"],
)
70 changes: 70 additions & 0 deletions javascript/selenium-manager/bin/selenium-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

'use strict'

const { execFileSync } = require('node:child_process')
const path = require('node:path')
const fs = require('node:fs')
const { platform } = require('node:process')

const PLATFORM_PACKAGES = {
linux: '@selenium/manager-linux-x64',
darwin: '@selenium/manager-darwin',
win32: '@selenium/manager-win32',
cygwin: '@selenium/manager-win32',
}

function getBinaryPath() {
if (process.env.SE_MANAGER_PATH) {
return process.env.SE_MANAGER_PATH
}

const pkgName = PLATFORM_PACKAGES[platform]
if (!pkgName) {
throw new Error(
`Unsupported platform: ${platform}. ` +
`Supported: linux, darwin, win32`
)
}

const isWindows = platform === 'win32' || platform === 'cygwin'
const binaryName = isWindows ? 'selenium-manager.exe' : 'selenium-manager'

let pkgJsonPath
try {
pkgJsonPath = require.resolve(`${pkgName}/package.json`)
} catch (_) {
throw new Error(
`Platform package ${pkgName} is not installed. ` +
`Run: npm install ${pkgName}`
)
}

const binPath = path.join(path.dirname(pkgJsonPath), 'bin', binaryName)
if (!fs.existsSync(binPath)) {
throw new Error(`Binary not found at expected path: ${binPath}`)
}
return binPath
}

const binary = getBinaryPath()
try {
execFileSync(binary, process.argv.slice(2), { stdio: 'inherit' })
} catch (err) {
process.exit(err.status ?? 1)
}
45 changes: 45 additions & 0 deletions javascript/selenium-manager/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@selenium/manager",
"version": "4.45.0",
"description": "Selenium Manager — browser and driver manager for the Selenium ecosystem",
"license": "Apache-2.0",
"keywords": [
"automation",
"selenium",
"testing",
"webdriver",
"browser-manager"
],
"homepage": "https://github.com/SeleniumHQ/selenium/tree/trunk/javascript/selenium-manager#readme",
"bugs": {
"url": "https://github.com/SeleniumHQ/selenium/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/SeleniumHQ/selenium.git"
},
"engines": {
"node": ">= 18.0.0"
},
"bin": {
"selenium-manager": "./bin/selenium-manager.js"
},
"optionalDependencies": {
"@selenium/manager-darwin": "4.45.0",
"@selenium/manager-linux-x64": "4.45.0",
"@selenium/manager-win32": "4.45.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/SeleniumHQ"
},
{
"type": "opencollective",
"url": "https://opencollective.com/selenium"
}
]
}
46 changes: 46 additions & 0 deletions py/selenium-manager-linux-x86-64/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
load("@rules_python//python:defs.bzl", "py_library")
load("@rules_python//python:packaging.bzl", "py_wheel")
load("//common:defs.bzl", "copy_file")

SM_VERSION = "4.45.0"

copy_file(
name = "manager-binary",
src = "//common/manager:selenium-manager-linux",
out = "selenium_manager_linux_x86_64/bin/selenium-manager",
)

py_library(
name = "lib",
srcs = ["selenium_manager_linux_x86_64/__init__.py"],
data = [":manager-binary"],
imports = ["."],
)

py_wheel(
name = "selenium-manager-linux-x86-64-wheel",
abi = "none",
classifiers = [
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Topic :: Software Development :: Testing",
],
description_content_type = "text/plain",
distribution = "selenium_manager_linux_x86_64",
entry_points = {
"console_scripts": {
"selenium-manager": "selenium_manager_linux_x86_64:main",
},
},
homepage = "https://www.selenium.dev",
license = "Apache-2.0",
platform = "linux_x86_64",
python_requires = ">=3.9",
python_tag = "py3",
strip_path_prefixes = ["py/selenium-manager-linux-x86-64/"],
summary = "Selenium Manager binary for Linux x86-64",
tags = ["release-artifact"],
version = SM_VERSION,
visibility = ["//visibility:public"],
deps = [":lib"],
)
Loading
Loading