Update rules_nodejs
This commit is contained in:
parent
f3b0c31354
commit
902f125954
2
defs.bzl
2
defs.bzl
|
@ -59,7 +59,7 @@ def setup_deps():
|
|||
|
||||
node_repositories(
|
||||
package_json = ["@ankidesktop//:package.json"],
|
||||
node_version = "16.10.0",
|
||||
node_version = "16.13.2",
|
||||
)
|
||||
|
||||
yarn_install(
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
"license": "AGPL-3.0-or-later",
|
||||
"description": "Anki JS support files",
|
||||
"devDependencies": {
|
||||
"@bazel/esbuild": "=4.3.0",
|
||||
"@bazel/typescript": "=4.3.0",
|
||||
"@bazel/worker": "=4.3.0",
|
||||
"@bazel/esbuild": "=4.6.2",
|
||||
"@bazel/typescript": "=4.6.2",
|
||||
"@bazel/worker": "=4.6.2",
|
||||
"@pyoner/svelte-types": "^3.4.4-2",
|
||||
"@sqltools/formatter": "^1.2.2",
|
||||
"@types/bootstrap": "^5.0.12",
|
||||
|
|
11
repos.bzl
11
repos.bzl
|
@ -82,8 +82,15 @@ def register_repos():
|
|||
maybe(
|
||||
http_archive,
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
|
||||
sha256 = "2644a66772938db8d8c760334a252f1687455daa7e188073f2d46283f2f6fbb7",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.2/rules_nodejs-4.6.2.tar.gz"],
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "rules_nodejs",
|
||||
sha256 = "f596117040134b9497a1049efe7a785924b4ff22557669780a0fa37e22b827bd",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.2/rules_nodejs-core-4.6.2.tar.gz"],
|
||||
)
|
||||
|
||||
# sass
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
diff --git a/node_modules/@bazel/typescript/internal/ts_project.bzl b/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
index a6342f1..bd48511 100755
|
||||
--- a/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
+++ b/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
@@ -336,11 +336,15 @@ def _replace_ext(f, ext_map):
|
||||
|
||||
def _out_paths(srcs, outdir, rootdir, allow_js, ext_map):
|
||||
rootdir_replace_pattern = rootdir + "/" if rootdir else ""
|
||||
- return [
|
||||
- _join(outdir, f[:f.rindex(".")].replace(rootdir_replace_pattern, "") + _replace_ext(f, ext_map))
|
||||
- for f in srcs
|
||||
- if _is_ts_src(f, allow_js)
|
||||
- ]
|
||||
+ out = []
|
||||
+ for f in srcs:
|
||||
+ f = _without_bin(f)
|
||||
+ if _is_ts_src(f, allow_js):
|
||||
+ out.append(_join(outdir, f[:f.rindex(".")].replace(rootdir_replace_pattern, "") + _replace_ext(f, ext_map)))
|
||||
+ return out
|
||||
+
|
||||
+def _without_bin(src):
|
||||
+ return src.replace("_bin_copy", "")
|
||||
|
||||
def ts_project_macro(
|
||||
name = "tsconfig",
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/node_modules/@bazel/typescript/internal/ts_project.bzl b/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
index 2fa84ac..5108b64 100755
|
||||
--- a/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
+++ b/node_modules/@bazel/typescript/internal/ts_project.bzl
|
||||
@@ -338,6 +336,9 @@ def _is_ts_src(src, allow_js):
|
||||
def _is_json_src(src, resolve_json_module):
|
||||
return resolve_json_module and src.endswith(".json")
|
||||
|
||||
+def _without_bin(src):
|
||||
+ return src.replace("_bin_copy", "")
|
||||
+
|
||||
def _replace_ext(f, ext_map):
|
||||
cur_ext = f[f.rindex("."):]
|
||||
new_ext = ext_map.get(cur_ext)
|
||||
@@ -352,6 +353,7 @@ def _out_paths(srcs, outdir, rootdir, allow_js, ext_map):
|
||||
rootdir_replace_pattern = rootdir + "/" if rootdir else ""
|
||||
outs = []
|
||||
for f in srcs:
|
||||
+ f = _without_bin(f)
|
||||
if _is_ts_src(f, allow_js):
|
||||
out = _join(outdir, f[:f.rindex(".")].replace(rootdir_replace_pattern, "") + _replace_ext(f, ext_map))
|
||||
|
26
yarn.lock
26
yarn.lock
|
@ -295,26 +295,26 @@
|
|||
"@babel/helper-validator-identifier" "^7.16.7"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@bazel/esbuild@=4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.3.0.tgz#a511d2090c4fccf865b7f6eafc95673f0486450b"
|
||||
integrity sha512-AUyyCYO17Uk/vaG9VSyDgLbQuW0ZY2ciDDp9frgHWPv55SdZolzAK0lA36QVJuz6/7I4EQBvox6KEpMPBR2f/A==
|
||||
"@bazel/esbuild@=4.6.2":
|
||||
version "4.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.6.2.tgz#1be88b6c4c07cabb2dd84a698d5be0f32de934f4"
|
||||
integrity sha512-VqmeIlEDq7tVNpIk88zS3DZSAV1F1VN92IBPekKuQqIU6PTt3+iID/v4lkK80SwFBthF4pi/PG0PPaulIe/qGA==
|
||||
|
||||
"@bazel/typescript@=4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.3.0.tgz#c4131ba7980f8e72885f5ec19c265ad9431e1a71"
|
||||
integrity sha512-ddPw0Xetl+a5UeZVHzpWsyMrUcAyhpGXknmfymx8vrWL+Y3yyquC7ZcYoYbkoCwIMBz7xhadm8NKIUYCrsEgaA==
|
||||
"@bazel/typescript@=4.6.2":
|
||||
version "4.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.6.2.tgz#9f07b6f8cfb6b0a0e228e5971de412911c910a90"
|
||||
integrity sha512-AUF7kq82bP6DX9Brihr/eQqvNccxVfSXosFxt80h94og5cmMyoc/euXha6rxlOBP3yWXmSo+/qjzO7o8PWJduQ==
|
||||
dependencies:
|
||||
"@bazel/worker" "4.3.0"
|
||||
"@bazel/worker" "4.6.2"
|
||||
protobufjs "6.8.8"
|
||||
semver "5.6.0"
|
||||
source-map-support "0.5.9"
|
||||
tsutils "3.21.0"
|
||||
|
||||
"@bazel/worker@4.3.0", "@bazel/worker@=4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-4.3.0.tgz#5ba7da1efa772f5dade5dfd4b662dcaa60ed7c1c"
|
||||
integrity sha512-K34/g/4aUAX8TOQ1MgBaZ+YeZkiIlwETwA50gheCAsasz0SWjvgcpIbwNkaL9fmXOVhDj2o55J20khsl5ItBIw==
|
||||
"@bazel/worker@4.6.2", "@bazel/worker@=4.6.2":
|
||||
version "4.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-4.6.2.tgz#0bd105344533335327c2edfa3fc65b04c39cdea8"
|
||||
integrity sha512-DLpN6iQAH6uiUraAs4CESyqs60u55fcKmYgOOVObGuLSQQuX49Lw7XRIN90NibRPwpbBDQichWE3zfra0yKTTw==
|
||||
dependencies:
|
||||
google-protobuf "^3.6.1"
|
||||
|
||||
|
|
Loading…
Reference in New Issue