Skip to content
Closed
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
84 changes: 70 additions & 14 deletions javascript/node/selenium-webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//javascript/node/selenium-webdriver:eslint/package_json.bzl", eslint_bin = "bin")
load("@npm//javascript/node/selenium-webdriver:prettier/package_json.bzl", prettier_bin = "bin")
Expand All @@ -20,31 +21,86 @@ BROWSER_VERSIONS = [
"v133",
]

copy_to_bin(
name = "tsconfig",
srcs = ["tsconfig.json"],
)

# js source files
filegroup(
name = "js_sources",
srcs = glob(
[
"*.js",
"example/*.js",
"http/*.js",
"io/*.js",
"lib/*.js",
"lib/fedcm/*.js",
"net/*.js",
"remote/*.js",
"testing/*.js",
"devtools/*.js",
"common/*.js",
"bidi/*.js",
],
),
)

# TypeScript source files
filegroup(
name = "ts_sources",
srcs = glob(
[
"*.ts",
"example/*.ts",
"http/*.ts",
"io/*.ts",
"lib/*.ts",
"lib/fedcm/*.ts",
"net/*.ts",
"remote/*.ts",
"testing/*.ts",
"devtools/*.ts",
"common/*.ts",
"bidi/*.ts",
],
allow_empty = True,
),
)

# TypeScript compilation
ts_project(
name = "ts-compile",
srcs = [":ts_sources"],
allow_js = False,
declaration = False,
source_map = True,
tsconfig = ":tsconfig",
deps = [
":node_modules/@bazel/runfiles",
":node_modules/@types/node",
":node_modules/jszip",
":node_modules/tmp",
":node_modules/ws",
],
)

# Include all JS files and TS compilation output
js_library(
name = "prod-src-files",
srcs = [
"CHANGES.md",
"README.md",
"package.json",
] + glob([
"*.js",
"example/*.js",
"http/*.js",
"io/*.js",
"lib/*.js",
"lib/fedcm/*.js",
"net/*.js",
"remote/*.js",
"testing/*.js",
"devtools/*.js",
"common/*.js",
"bidi/*.js",
]),
":js_sources",
],
deps = [
":node_modules/@bazel/runfiles",
":node_modules/jszip",
":node_modules/tmp",
":node_modules/ws",
":ts-compile",
],
)

Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/lib/pinnedScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const crypto = require('node:crypto')
class PinnedScript {
constructor(script) {
this.scriptSource_ = script
// eslint-disable-next-line

this.scriptHandle_ = crypto.randomUUID().replace(/-/gi, '')
}

Expand Down
222 changes: 0 additions & 222 deletions javascript/node/selenium-webdriver/lib/proxy.js

This file was deleted.

Loading
Loading