Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ yarn-error.log
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/yarn.js

# User specific bazel settings
.bazelrc.user
Expand Down
6 changes: 6 additions & 0 deletions .yarn/yarn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const {fork} = require('child_process');

// Wrapper script to workaround a bug in `rules_nodejs` where `.cjs`
// vendored files are not detected and launched as binaries (breaking Windows).
// TODO: Remove once https://github.com/bazelbuild/rules_nodejs/pull/3350 is available.
fork(__dirname + '/releases/yarn-3.2.0.cjs', process.argv.slice(2));
4 changes: 3 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ yarn_install(
args = ["--immutable"],
data = [
"//:.yarn/releases/yarn-3.2.0.cjs",
"//:.yarn/yarn.js",
"//:.yarnrc.yml",
],
# Currently disabled due to:
# 1. Missing Windows support currently.
# 2. Incompatibilites with the `ts_library` rule.
exports_directories_only = False,
package_json = "//:package.json",
yarn = "//:.yarn/releases/yarn-3.2.0.cjs",
# TODO: Cleanup when https://github.com/bazelbuild/rules_nodejs/pull/3350 is available.
yarn = "//:.yarn/yarn.js",
yarn_lock = "//:yarn.lock",
)

Expand Down