File tree Expand file tree Collapse file tree 9 files changed +710
-606
lines changed
javascript/node/selenium-webdriver Expand file tree Collapse file tree 9 files changed +710
-606
lines changed Original file line number Diff line number Diff line change 11load ("@aspect_bazel_lib//lib:copy_to_bin.bzl" , "copy_to_bin" )
22load ("@aspect_rules_js//js:defs.bzl" , "js_library" )
33load ("@aspect_rules_js//npm:defs.bzl" , "npm_package" )
4+ load ("@aspect_rules_ts//ts:defs.bzl" , "ts_project" )
45load ("@npm//:defs.bzl" , "npm_link_all_packages" )
56load ("@npm//javascript/node/selenium-webdriver:eslint/package_json.bzl" , eslint_bin = "bin" )
67load ("@npm//javascript/node/selenium-webdriver:prettier/package_json.bzl" , prettier_bin = "bin" )
@@ -20,31 +21,86 @@ BROWSER_VERSIONS = [
2021 "v133" ,
2122]
2223
24+ copy_to_bin (
25+ name = "tsconfig" ,
26+ srcs = ["tsconfig.json" ],
27+ )
28+
29+ # js source files
30+ filegroup (
31+ name = "js_sources" ,
32+ srcs = glob (
33+ [
34+ "*.js" ,
35+ "example/*.js" ,
36+ "http/*.js" ,
37+ "io/*.js" ,
38+ "lib/*.js" ,
39+ "lib/fedcm/*.js" ,
40+ "net/*.js" ,
41+ "remote/*.js" ,
42+ "testing/*.js" ,
43+ "devtools/*.js" ,
44+ "common/*.js" ,
45+ "bidi/*.js" ,
46+ ],
47+ ),
48+ )
49+
50+ # TypeScript source files
51+ filegroup (
52+ name = "ts_sources" ,
53+ srcs = glob (
54+ [
55+ "*.ts" ,
56+ "example/*.ts" ,
57+ "http/*.ts" ,
58+ "io/*.ts" ,
59+ "lib/*.ts" ,
60+ "lib/fedcm/*.ts" ,
61+ "net/*.ts" ,
62+ "remote/*.ts" ,
63+ "testing/*.ts" ,
64+ "devtools/*.ts" ,
65+ "common/*.ts" ,
66+ "bidi/*.ts" ,
67+ ],
68+ allow_empty = True ,
69+ ),
70+ )
71+
72+ # TypeScript compilation
73+ ts_project (
74+ name = "ts-compile" ,
75+ srcs = [":ts_sources" ],
76+ allow_js = False ,
77+ declaration = False ,
78+ source_map = True ,
79+ tsconfig = ":tsconfig" ,
80+ deps = [
81+ ":node_modules/@bazel/runfiles" ,
82+ ":node_modules/@types/node" ,
83+ ":node_modules/jszip" ,
84+ ":node_modules/tmp" ,
85+ ":node_modules/ws" ,
86+ ],
87+ )
88+
89+ # Include all JS files and TS compilation output
2390js_library (
2491 name = "prod-src-files" ,
2592 srcs = [
2693 "CHANGES.md" ,
2794 "README.md" ,
2895 "package.json" ,
29- ] + glob ([
30- "*.js" ,
31- "example/*.js" ,
32- "http/*.js" ,
33- "io/*.js" ,
34- "lib/*.js" ,
35- "lib/fedcm/*.js" ,
36- "net/*.js" ,
37- "remote/*.js" ,
38- "testing/*.js" ,
39- "devtools/*.js" ,
40- "common/*.js" ,
41- "bidi/*.js" ,
42- ]),
96+ ":js_sources" ,
97+ ],
4398 deps = [
4499 ":node_modules/@bazel/runfiles" ,
45100 ":node_modules/jszip" ,
46101 ":node_modules/tmp" ,
47102 ":node_modules/ws" ,
103+ ":ts-compile" ,
48104 ],
49105)
50106
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const crypto = require('node:crypto')
2020class PinnedScript {
2121 constructor ( script ) {
2222 this . scriptSource_ = script
23- // eslint-disable-next-line
23+
2424 this . scriptHandle_ = crypto . randomUUID ( ) . replace ( / - / gi, '' )
2525 }
2626
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments