Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel run uses headless chrome #1881

Closed
Serginho opened this issue May 11, 2020 · 11 comments
Closed

Bazel run uses headless chrome #1881

Serginho opened this issue May 11, 2020 · 11 comments
Labels
Can Close? We will close this in 30 days if there is no further activity package:karma question/docs Answer users question, preferably by updating docs

Comments

@Serginho
Copy link

Serginho commented May 11, 2020

馃悶 bug report

Affected Rule

karma_web_test_suite

Is this a regression?

yes

Description

After reset OS X catalina and reinstall my project. Bazel run isn't opening chromium, instead of that, it opens headless chrome.

Apparently nothing changes, I think there is a bug here, but something in my cache or previous downloaded files have been hidding.

I've tried to use angular-cli empty project with the same results.

Versions

In my project:

Bazel: 2.1.0
Rules nodejs: 1.6.1
Angular Cli: 9.1.5
NodeJs: 10.16.3

馃敩 Minimal Reproduction

ng new bazel --collection=@angular/bazel
yarn ng build --leaveBazelFilesOnDisk
yarn bazel run //src:test

馃敟 Exception or Error

yarn run v1.22.4
$ /Users/astrum/tulotero/bazel/node_modules/.bin/bazel run //src:test
INFO: Analyzed target //src:test_chromium-local (124 packages loaded, 2245 targets configured).
INFO: Found 1 target...
Target //src:test_chromium-local up-to-date:
  dist/bin/src/test_chromium-local.gen.json
  dist/bin/src/test_chromium-local.sh
INFO: Elapsed time: 32.975s, Critical Path: 18.67s
INFO: 7 processes: 4 local, 3 worker.
INFO: Build completed successfully, 33 total actions
INFO: Build completed successfully, 33 total actions
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //src:test_chromium-local
-----------------------------------------------------------------------------
GREP_COLOR=1;32
npm_package_devDependencies__bazel_typescript=1.6.0
GTEST_TMP_DIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/_tmp/ecb68a7d1ce0def939867d45e94d6473
TEST_INFRASTRUCTURE_FAILURE_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.infrastructure_failure
npm_package_dependencies__angular_forms=~9.1.6
npm_package_dependencies__angular_router=~9.1.6
npm_package_devDependencies__angular_bazel=~9.1.6
TERM_PROGRAM=iTerm.app
TEST_SRCDIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles
NODE=/usr/local/bin/node
npm_config_version_git_tag=true
npm_package_devDependencies_rollup_plugin_commonjs=10.1.0
npm_package_devDependencies_typescript=~3.8.3
INIT_CWD=/Users/astrum/tulotero/bazel/src
TERM=xterm-256color
SHELL=/bin/zsh
WEB_TEST_METADATA=project/src/test_chromium-local.gen.json
JAVA_RUNFILES=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles
npm_package_dependencies__angular_platform_browser_dynamic=~9.1.6
_RLOCATION_ISABS_PATTERN=^/[^/].*
npm_package_dependencies__angular_animations=~9.1.6
npm_package_devDependencies__bazel_karma=1.6.0
npm_package_devDependencies_tslint=~6.1.0
TMPDIR=/var/folders/py/wz22glgj44x2jlwj_fl2h4k80000gn/T/
npm_config_init_license=MIT
npm_package_scripts_lint=ng lint
npm_package_devDependencies_history_server=1.3.1
TERM_PROGRAM_VERSION=3.3.9
TEST_UNUSED_RUNFILES_LOG_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.unused_runfiles_log
npm_package_devDependencies__bazel_bazel=2.1.0
TERM_SESSION_ID=w0t0p0:C6DB9AF5-ED57-43A6-8BC4-1BA8AE6A397F
npm_config_registry=https://registry.yarnpkg.com
npm_package_private=true
npm_package_devDependencies_karma_jasmine=2.0.1
TEST_LOGSPLITTER_OUTPUT_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.raw_splitlogs/test.splitlogs
ZSH=/Users/astrum/.oh-my-zsh
TEST_BINARY=src/test_chromium-local.sh
npm_package_readmeFilename=README.md
npm_package_description=This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.5.
USER=astrum
npm_package_devDependencies__bazel_rollup=1.6.0
TEST_UNDECLARED_OUTPUTS_DIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.outputs
npm_package_devDependencies_jasmine_core=~3.5.0
TEST_TIMEOUT=900
RUNFILES_DIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles
npm_package_devDependencies_karma=4.4.1
npm_package_devDependencies__types_jasminewd2=~2.0.3
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.27bKLLL0Zr/Listeners
npm_package_devDependencies_html_insert_assets=0.5.0
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x8
npm_package_scripts_e2e=ng e2e
npm_execpath=/Users/astrum/.npm-global/lib/node_modules/yarn/bin/yarn.js
PAGER=less
npm_package_devDependencies_protractor=5.4.2
LSCOLORS=ExfxbEaEBxxEhEhBaDaCaD
TEST_TARGET=//src:test_chromium-local
npm_package_scripts_postinstall=ngcc --properties es2015 browser module main
npm_package_devDependencies_jasmine_spec_reporter=~4.2.1
npm_config_argv={"remain":[],"cooked":["run","bazel"],"original":["bazel","run","//src:test"]}
PATH=.:/bin:/usr/bin:/usr/local/bin
TEST_TEMPDIR=test_tempdir.dMV1Z8
npm_package_devDependencies_rollup=1.27.5
npm_package_devDependencies_karma_chrome_launcher=3.1.0
npm_package_dependencies__angular_platform_browser=~9.1.6
npm_package_devDependencies_terser=4.4.0
PWD=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles/project
npm_lifecycle_event=bazel
npm_package_name=bazel
LANG=es_ES.UTF-8
TEST_WARNINGS_OUTPUT_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.warnings
ITERM_PROFILE=Default
TZ=UTC
npm_config_version_commit_hooks=true
npm_package_scripts_start=ng serve
npm_package_scripts_build=ng build
npm_package_dependencies_rxjs=~6.5.4
npm_package_devDependencies_karma_coverage_istanbul_reporter=~2.1.0
npm_package_dependencies_zone_js=~0.10.2
XPC_FLAGS=0x0
npm_config_bin_links=true
npm_package_devDependencies__angular_cli=~9.1.5
npm_package_version=0.0.0
npm_package_scripts_ng=ng
XPC_SERVICE_NAME=0
TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.outputs_manifest
npm_package_devDependencies__bazel_terser=1.6.0
SHLVL=5
HOME=/Users/astrum
COLORFGBG=15;0
npm_package_scripts_test=ng test
npm_package_devDependencies__angular_compiler_cli=~9.1.6
RUN_UNDER_RUNFILES=1
npm_config_strict_ssl=true
npm_config_save_prefix=^
GREP_OPTIONS=--color=auto --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn
LC_TERMINAL_VERSION=3.3.9
TEST_SIZE=large
BUILD_WORKING_DIRECTORY=/Users/astrum/tulotero/bazel
npm_config_version_git_message=v%s
npm_package_devDependencies_karma_firefox_launcher=1.2.0
npm_package_dependencies__angular_compiler=~9.1.6
npm_package_devDependencies_ts_node=~8.3.0
ITERM_SESSION_ID=w0t0p0:C6DB9AF5-ED57-43A6-8BC4-1BA8AE6A397F
TEST_TMPDIR=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/_tmp/ecb68a7d1ce0def939867d45e94d6473
YARN_WRAP_OUTPUT=false
LESS=-R
LOGNAME=astrum
npm_package_devDependencies_karma_sourcemap_loader=0.3.7
npm_package_devDependencies_codelyzer=^5.1.2
npm_package_devDependencies_karma_requirejs=1.1.0
LC_CTYPE=es_ES.UTF-8
XML_OUTPUT_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.xml
TEST_WORKSPACE=project
BUILD_WORKSPACE_DIRECTORY=/Users/astrum/tulotero/bazel
npm_package_dependencies__angular_common=~9.1.6
npm_package_devDependencies_karma_jasmine_html_reporter=^1.4.2
npm_package_devDependencies_rollup_plugin_node_resolve=5.2.0
npm_package_dependencies_tslib=^1.10.0
npm_config_user_agent=yarn/1.22.4 npm/? node/v12.16.3 darwin x64
npm_config_ignore_scripts=
npm_config_version_git_sign=
npm_package_dependencies__angular_core=~9.1.6
npm_package_devDependencies_requirejs=2.3.6
npm_package_devDependencies__types_node=^12.11.1
LC_TERMINAL=iTerm2
npm_config_ignore_optional=
npm_config_init_version=1.0.0
npm_package_devDependencies__types_jasmine=~3.5.0
PYTHON_RUNFILES=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles
TEST_PREMATURE_EXIT_FILE=/private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/testlogs/src/test_chromium-local/test.exited_prematurely
npm_package_devDependencies__bazel_protractor=1.6.0
npm_config_prefix=/Users/astrum/.npm-global
npm_config_version_tag_prefix=v
npm_package_devDependencies__bazel_ibazel=0.12.3
npm_node_execpath=/usr/local/bin/node
COLORTERM=truecolor
BASH_FUNC_rlocation%%=() {  if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): start" 1>&2;
 fi;
 if [[ "$1" =~ $_RLOCATION_ISABS_PATTERN ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): absolute path, return" 1>&2;
 fi;
 echo "$1";
 else
 if [[ "$1" == ../* || "$1" == */.. || "$1" == ./* || "$1" == */./* || "$1" == "*/." || "$1" == *//* ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "ERROR[runfiles.bash]: rlocation($1): path is not normalized" 1>&2;
 fi;
 return 1;
 else
 if [[ "$1" == \\* ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "ERROR[runfiles.bash]: rlocation($1): absolute path without" "drive name" 1>&2;
 fi;
 return 1;
 else
 if [[ -e "${RUNFILES_DIR:-/dev/null}/$1" ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): found under RUNFILES_DIR ($RUNFILES_DIR), return" 1>&2;
 fi;
 echo "${RUNFILES_DIR}/$1";
 else
 if [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): looking in RUNFILES_MANIFEST_FILE ($RUNFILES_MANIFEST_FILE)" 1>&2;
 fi;
 local -r result=$(grep -m1 "^$1 " "${RUNFILES_MANIFEST_FILE}" | cut -d ' ' -f 2-);
 if [[ -e "${result:-/dev/null}" ]]; then
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): found in manifest as ($result)" 1>&2;
 fi;
 echo "$result";
 else
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "INFO[runfiles.bash]: rlocation($1): not found in manifest" 1>&2;
 fi;
 echo "";
 fi;
 else
 if [[ "${RUNFILES_LIB_DEBUG:-}" == 1 ]]; then
 echo "ERROR[runfiles.bash]: cannot look up runfile \"$1\" " "(RUNFILES_DIR=\"${RUNFILES_DIR:-}\"," "RUNFILES_MANIFEST_FILE=\"${RUNFILES_MANIFEST_FILE:-}\")" 1>&2;
 fi;
 return 1;
 fi;
 fi;
 fi;
 fi;
 fi
}
BASH_FUNC_runfiles_export_envvars%%=() {  if [[ ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" && ! -d "${RUNFILES_DIR:-/dev/null}" ]]; then
 return 1;
 fi;
 if [[ ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
 if [[ -f "$RUNFILES_DIR/MANIFEST" ]]; then
 export RUNFILES_MANIFEST_FILE="$RUNFILES_DIR/MANIFEST";
 else
 if [[ -f "${RUNFILES_DIR}_manifest" ]]; then
 export RUNFILES_MANIFEST_FILE="${RUNFILES_DIR}_manifest";
 else
 export RUNFILES_MANIFEST_FILE=;
 fi;
 fi;
 else
 if [[ ! -d "${RUNFILES_DIR:-/dev/null}" ]]; then
 if [[ "$RUNFILES_MANIFEST_FILE" == */MANIFEST && -d "${RUNFILES_MANIFEST_FILE%/MANIFEST}" ]]; then
 export RUNFILES_DIR="${RUNFILES_MANIFEST_FILE%/MANIFEST}";
 export JAVA_RUNFILES="$RUNFILES_DIR";
 else
 if [[ "$RUNFILES_MANIFEST_FILE" == *_manifest && -d "${RUNFILES_MANIFEST_FILE%_manifest}" ]]; then
 export RUNFILES_DIR="${RUNFILES_MANIFEST_FILE%_manifest}";
 export JAVA_RUNFILES="$RUNFILES_DIR";
 else
 export RUNFILES_DIR=;
 fi;
 fi;
 fi;
 fi
}
BASH_FUNC_is_absolute%%=() {  [[ "$1" = /* ]] || [[ "$1" =~ ^[a-zA-Z]:[/\\].* ]]
}
_=/usr/bin/printenv




Running karma tests
-----------------------------------------------------------------------------
version     : 4.4.1
pwd         : /private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles/project
conf        : /private/var/tmp/_bazel_astrum/9c6583209b42166759bee3ba091a5583/execroot/project/bazel-out/darwin-fastbuild/bin/src/test_chromium-local.sh.runfiles/project/src/test_wrapped_test.conf.js
node_options:

11 05 2020 10:50:59.396:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
11 05 2020 10:50:59.399:INFO [launcher]: Launching browsers CustomChromeWithoutSandbox with concurrency unlimited
11 05 2020 10:50:59.408:INFO [launcher]: Starting browser ChromeHeadless
11 05 2020 10:51:02.170:INFO [HeadlessChrome 76.0.3809 (Mac OS X 10.15.4)]: Connected on socket n8KEvWVDjcFNcJjGAAAA with id 67308780

@Serginho
Copy link
Author

Even with --define DISPLAY=true opens headless chrome

@joeljeske
Copy link
Contributor

Where you able to find a solution?

@Serginho
Copy link
Author

Serginho commented May 19, 2020

@joeljeske When you execute bazel run //target and chrome headless is opened, in the logs, you will find the url, just open it manually in your browser and you will get same behavior (localhost:9876 is in my case). Actually, I think this way is more confortable because when you use ibazel run //target, every time you change something in code, browser was reopened, now copying the url in your browser, you only have to press reload.

I've closed the issue because no one tagged this issue, I'm seeing other recent issues have been tagged, so I think they are ignoring it.

@joeljeske
Copy link
Contributor

joeljeske commented May 19, 2020

Ahh yes that was the only solution I have found as well, yet I think it鈥檚 not how it is supposed to work.

Would you mind reopening it?(if not I can create a new one).

I think the issue is relevant, even if the docs are only updated to state the workaround you mentioned. I think the guys are busy but don鈥檛 give up on them :)

@Serginho
Copy link
Author

Ok, you re right. I'll keep it open.

@Serginho Serginho reopened this May 19, 2020
@evahowe evahowe added Angular CLI parity package:karma question/docs Answer users question, preferably by updating docs labels May 20, 2020
@joeljeske
Copy link
Contributor

@alexeagle any idea what could be causing this? I looked into the browser launching code, but amongst the karma launchers and the managed browser downloads I got a bit lost. Maybe you could point me in the right direction?

@alexeagle
Copy link
Collaborator

@gregmagolan knows a lot more about this part.

@joeljeske
Copy link
Contributor

@Serginho so it turns out you are correct that DISPLAY=true using --define=DISPLAY=true needs to be set when the test bootstraps in order to use the standard chrome. However, you must also pass that var name in order for the rule to use it.

karma_web_test_suite(
  ...
  configuration_env_vars = ["DISPLAY"],
)

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label Sep 20, 2020
@alexeagle
Copy link
Collaborator

@joeljeske what do you think of #2202 to make this easier for the next person to find?

@joeljeske
Copy link
Contributor

Yup that鈥檚 perfect thanks.

alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this issue Sep 20, 2020
@mattem mattem closed this as completed in 56b8f69 Sep 20, 2020
lherman-cs pushed a commit to lherman-cs/rules_nodejs that referenced this issue Jan 15, 2021
fix: remove duplicate Importing

chore: upgrade rollup to ^2.3.0

fix: coverage (bazelbuild#2100)

* test: add coverage e2e test

* fix(builtin): fix coverage lcov merger script jumping out of sandbox and not being able to find c8

* test: don't test coverage on Windows

docs: use @npm//@bazel for example load sites

fix(cypress): allow for async cypress plugins

cypress_repository now fails if cypress verify fails
set the HOME env variable since cypress writes files to it
remove unused includeScreenshots / includeVideos variables
browserify files are no longer included in test output files
screenshots/videos are stored directory in TEST_UNDECLARED_OUTPUTS_DIR

docs: update docs for release

chore(release): 2.0.2

chore: update lock files for release

feat(example): add targets in angular_bazel_architect for production serve and build

fix(examples): use ./ prefix on babel config file

Otherwise if it's in a subfolder, babel will think it's an npm package

chore: update dependency com_google_protobuf to v3.13.0 (bazelbuild#2103)

refactor(rollup): use rollup loadConfigFile API

chore: update dependency bazel_toolchains to v3.4.1

build(deps): bump elliptic in /e2e/fine_grained_symlinks

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.4.1...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

fix(typescript): only expect .js outs for .tsx? srcs (bazelbuild#2118)

Fixes bazelbuild#2115

feat(builtin): new js_library rule (bazelbuild#2109)

Removes `node_module_library` private API and renames it to `js_library`

the latter will be promoted to a public API in a followup change

fix(typescript): produce .d.ts as default output rather than empty (bazelbuild#2117)

This lets you type-check a ts_project(emit_declaration_only=True) just by building it (its default outputs)

Fixes bazelbuild#2116

added script to generate NodeJS versions for node_repositories and added most up-to-date versions (bazelbuild#2126)

Co-authored-by: Matt Insler <matt.insler@airbnb.com>

refactor: move node version list into its own file (bazelbuild#2128)

Add a package.json script for updating it

docs: update docs for release

chore(release): 2.0.3

chore: update lock files for release

fix(typescript): add the tsBuildInfoFile option to ts_project (bazelbuild#2138)

Like other options that affect tsc outputs, Bazel needs to know the value from the tsconfig if its set.
Add it to our validator so there's a buildozer command to sync the option value into the BUILD file.

Fixes bazelbuild#2137

refactor(typescript): remove private _TsConfigInfo in ts_project (bazelbuild#2139)

Instead use the same TsConfigInfo that ts_library uses.

Fixes bazelbuild#1931

docs: refresh docsite

docs: minor cleanup of builtins page

don't include the defaults which are giant dictionaries as they render poorly

docs: fix spacing and link colours on rhs sidenav

Fix circleci status badges to pin to stable branch

CircleCI docs claim that they should use the default branch by default, but this icon is green while stable is red, so I think it's still reporting on master.

ci: all angular examples timeout=long

chore: update dependency bazel_toolchains to v3.4.2

chore: update circleci image to latest to pick up newer chrome

docs: add search to docsite using gcse

feat(typescript): generate tsconfig.json for ts_project (bazelbuild#2130)

This is an experimental, opt-in feature where ts_project will generate a tsconfig.json file in place of
the user specifying one in the source directory.

I expect a long tail of compatibility bugs since any path appearing in this generated file needs to point from
bazel-out back to the source directory.

Fixes bazelbuild#2058

docs: replace references to //packages/ with the @npm//@bazel/ equivalent (bazelbuild#2154)

feat(builtin): accept any stamp vars in pkg_npm

NOTE: instead of replacing the replace_with_version with 0.0.0 in unstamped builds,
we now omit the replacement.

See bazelbuild#1694

docs(rollup): add stamping and debug to rollup doc

Also move most of the content above the list of rules. It shows up better in the TOC since rollup_bundle
can be its own entry later in the page, and avoids the API doc table of attributes just appearing with no header.

docs: document the node_context_data attribute

It can be useful if you need to turn on/off stamping per-target.
`java_binary` gives a dedicated stamp attribute for this purpose

Fixes bazelbuild#1693

chore: hide generated .html files in code review

feat(builtin): support for substitutions

fix: use golden_file_test instead

refactor: cleanup pkg_web stamping feature

chore: update dependency bazel_toolchains to v3.5.0 (bazelbuild#2168)

Updated nodejs versions (14.9.0) (bazelbuild#2169)

docs: update docs for release

chore(release): 2.1.0

chore: update lock files for release

chore: try github actions version of stale bot

The probot one never triggered despite being setup correctly AFAICT.
This bot seems better supported and I sow it working on bazel-watcher repo.

build(deps): bump http-proxy from 1.18.0 to 1.18.1

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump yargs-parser in /e2e/ts_devserver

Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

Signed-off-by: dependabot[bot] <support@github.com>

ci: stamp our releases with a stable key

fix(builtin): don't set --preserve-symlinks-main by default (bazelbuild#2176)

feat: add link_workspace_root to nodejs_binary, npm_package_bin, rollup_bundle, terser_minified, ts_project

Link the workspace root to the bin_dir to support absolute requires like 'my_wksp/path/to/file'.
If source files need to be required then they can be copied to the bin_dir with copy_to_bin.

fix(builtin): fix bazel coverage masking test failures

test(builtin): test failing test with bazel coverage

build(deps): bump http-proxy in /examples/protocol_buffers

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump http-proxy in /examples/web_testing

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

test(rollup): fix test failing due to missing dep

fix(rollup): allow config files to override default onwarn method

Fixes bazelbuild#2084

feat: link_workspace_root not needed in terser_minified

docs: add spica to adopter organization list (bazelbuild#2184)

* Add spica to adopter organization list (bazelbuild#2183)
* docs: update the 'send a PR' link to point to the stable branch

Co-authored-by: Sahin Yort <thesayyn@gmail.com>

feat: promote js_library to public API

Fixes bazelbuild#149
Fixes bazelbuild#1771

docs: update docs for release

chore(release): 2.2.0

chore: update lock files for release

Update readme (bazelbuild#2190)

Fix missing `}` and indentation

feat: add strict_visibility to npm_install / yarn_install rules (bazelbuild#2193)

With strict_visibility enabled (currently defaults false), only dependencies within the given `package.json` file are given public visibility.

All transitive dependencies are given limited visibility, enforcing that all direct dependencies are listed in the `package.json` file.

closes bazelbuild#2110

fix: don't glob yarn or node files when using vendored_node or vendored_yarn

- Fixes a visibility issue with rollup-worker

fix(examples): prevent ibazel EOF

Fixes bazelbuild#2143

docs(karma): document how to use non-headless Chrome (bazelbuild#2202)

Fixes bazelbuild#1881

docs(labs): produce stardoc API for labs

Fixes bazelbuild#2195

fix(karma): allow custom browsers to specify args (fixes bazelbuild#595)

Today, the args as specified in the various manifests of the rules_webtesting
browsers never make it into the generated karma.conf.js. This results in these
arguments never being used when launching Chrome, preventing customization of
browsers such as window size, enabling remote debugging, or other flag-based
options. This PR fixes this by reading those arguments from the manifest, and
adding them to the browsers list in the generated karma.conf.js.

Also, this PR includes a change to generated_file_test to allow a golden file
to represent a substring of the generated output.

Also Also: This PR includes a golden file test that verified that the generated
karma.conf.js does read in the specified value.

Furthermore, the effect of this can be verified manually via:
```
VERBOSE_LOGS=1 bazel run packages/karma/test/karma:testing_custom_chrome
```
Note the appearance of the additional flags in the new debug output.

fix(builtin): js_library: correctly propagate DeclarationInfos

Transitive typings are added to typings_depsets, but we were checking
the typings array instead.

Signed-off-by: Duarte Nunes <duarte@hey.com>

feat: update nodejs versions (bazelbuild#2207)

include 10.22.1, 12.18.4, 14.10.0, 14.10.1, 14.11.0 and 14.12.0 in node_versions

Added s390x support

docs: update docs for release

chore(release): 2.2.1

chore: update lock files for release

ci: tell Angular CLI not to update webdriver

It can get ahead of the Chrome version on our CI machine

ci: replace --webdriver-update=false with --no-webdriverUpdate

Architect CLI uses minimist under the hood to parse arguments. Minimist will not convert boolean like values unless they are known options or the `{boolean: true}` option is configured (Which is not in Architect CLI).

feat(karma): use Trusted Types policy when loading scripts for Karma

When the Karma plugin is used in a testing environment that enforces
Trusted Types, its loadFile functionality currently fails due to a
Trusted Types violation when assigning to script.textContent. This makes
it impossible to use the plugin with integration tests that ensure an
application is compatible with Trusted Types.

This is fixed by creating a Trusted Types policy specifically for the
Karma plugin, and use it to promote any loaded scripts to a TrustedScript
before assigning to script.textContent. This is done in a way that is
backwards compatible:
- The policy is `null` in browsers that don't yet support Trusted Types,
  in which case the original script string is used as before.
- When Trusted Types are supported in the browser but not enforced by
  the application, the browser treats the TrustedScript as if it were a
  string when it is assigned to script.textContent.

chore: update dependency bazel_toolchains to v3.6.0

docs: remove HTML tables so docs can be authored in markdown without need for html escaping

docs(rollup): improve clarity

feat(example): add full pwa support

feat(example): service worker update handling

fix(exmaple): add docstring to ngsw_config rule

fix(example): remove server side compression

fix(example): remove index.html from prodapp srcs

fix(example): remove compression dependencies

fix(builtin): js_library supports --output_groups=types

If providing DeclarationInfo we should also give this way for filegroup/bazel CLI to select them

chore: docgen

docs: update docs for release

chore(release): 2.2.2

chore: update lock files for release

fix(builtin): give a longer timeout for _create_build_files

A user reports that their build file generation takes longer than 600 seconds.
It's probably a bug that we are so slow, but let's address that separately (maybe in our work for npm v7)

Also note we could have made this timeout user-configurable, but I think the extra API surface isn't worth the benefit.

Fixes bazelbuild#2231

fix(typescript): don't include _valid_options marker file in outs

Tested by building //packages/angular:npm_package and don't get an extra .d.ts file in the package.
Also tested the negative case by making an invalid option and check that it's still reported.

Fixes bazelbuild#2078

chore: allow node versions <= 14.14.0

chore: update rules_docker to 0.14.4

docs: minor update for readability and formatting (bazelbuild#2243)

* docs: minor update for readibility and formating

Fix small typo in changelog

chore(docs): move ts_library docs into ts_library

Also recommend ts_project for new uses

chore(karma): remove dependency on tmp

feat(typescript): add allow_js support to ts_project

fix(exmaples/nestjs): add module_name field in ts_library

docs: fix a typo of angular-architect example (bazelbuild#2272)

chore: bump days before closing stale issues to 90

Fix select with conditons on darwin.

Bazel is changing how @bazel_tools/conditions:darwin is implemented.
With old implementation based on flags, it was ok to have darwin and
darwin_x86_64 in a select. This was based on flag --cpu=darwin and
--cpu=dawin_x86_64.

New implementation is based on constraints, where "darwin" means OS (and
any CPU), while "darwin_x86_64" mean only specific CPU. As such they
cannot be used in the same select, because the selection would be
ambiguous.

build: add 'fix-windows' tag due to windows flaky tests

Will revisit the linker and test, but this is blocking PRs from being merged

feat(typescript): worker mode for ts_project (bazelbuild#2136)

* feat(typescript): worker mode for ts_project

* chore: cleanup and declare protobufjs dependency

* fix: do not pass --watch for non-worker mode

* fix: do not test worker on windows

* fix: log on standalone failures

* chore: docs improvements

Co-authored-by: Alex Eagle <alex.eagle@robinhood.com>
Co-authored-by: Dan Muller <mrmeku@stairwell.com>

feat(node_repositories): Added auth option for downloading nodejs and yarn

fix: npm_package.pack should work in windows os

feat(examples): adds example for running jest with typescript (bazelbuild#2245)

fix(typescript): specify rootDir as absolute path

Also allow non-ts files across src/bin dir, since they are not emitted we don't need the rootdir
calculation to take them into account. This lets the Angular compiler accept .ts sources from
source dir even if the css inputs are generated.

refactor: ts_project cleanup

feat(cypress): remove browiserify preprocessor

docs: update docs for release

chore(release): 2.3.0

chore: update lock files for release

fix: npm_package.pack on Windows should not generate undefined.tgz

chore: update nodejs versions (bazelbuild#2284)

perf(cypress): pack cypress runfiles into a single tar

chore: add GitHub Workflow to update NodeJS versions every night

chore: fix a link

Current link returns 404, it seems that the url was somehow changed to .html from .md.

chore: fix the link again

haha

fix(builtin): make linker deterministic when resolving from manifest & fix link_workspace_root with no runfiles

chore: re-lock jest dependencies

It was using a non-standard repository, which had downtime this morning

chore(release): 2.3.1

chore: update lock files for release

chore: update dependency com_google_protobuf to v3.14.0

chore: update dependency bazel_toolchains to v3.7.0

fix launcher script terminating before child terminates on SIGTERM

chore: update dependency bazel_toolchains to v3.7.1

fix(examples): fix jest example on windows

Fixes bazelbuild#1454

fix(builtin): give better error when linker runs on Node <10

Example how this looks now:

```
[20 / 21] Bundling JavaScript bundle.js [parcel]; 4s remote-cache, darwin-sandbox
ERROR: /private/var/folders/r7/2kp53v7n091gcz93xlt7wtd80000gn/T/tmp-48948DHy4HrXTwhRy/BUILD.bazel:4:1: Bundling JavaScript bundle.js [parcel] failed (Exit 1) parcel.sh failed: error executing command bazel-out/host/bin/external/npm/parcel-bundler/bin/parcel.sh build foo.js --out-dir bazel-out/darwin-fastbuild/bin --out-file bundle.js ... (remaining 2 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
ERROR: rules_nodejs linker requires Node v10 or greater, but is running on 8.11.2
Note that earlier Node versions are no longer in long-term-support, see
https://nodejs.org/en/about/releases/
INFO: Elapsed time: 40.360s, Critical Path: 12.97s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
//:test                                                               NO STATUS
```

Fixes bazelbuild#2304

docs(typescript): link some user-contributed doc (bazelbuild#2322)

Fixes bazelbuild#2298

chore: allow node versions >=12 <=14 (bazelbuild#2332)

chore: allow node versions >=12 <=14

feat: add esbuild package

chore: add module_mapping support via the aspect instead of manual implementing it

chore: sqash

feat: update to latest esbuild, add additional flags when not minifying

fix: consume both JSEcmaScriptModuleInfo and JSModuleInfo to support js_library

fix: add missing bzl libraries and publish helpers

test: use runfiles helper in test

fix: use exe for Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? We will close this in 30 days if there is no further activity package:karma question/docs Answer users question, preferably by updating docs
Projects
None yet
Development

No branches or pull requests

4 participants