116 Commits

Author SHA1 Message Date
Greg Magolan
58e175318c build: update to rules_nodejs 1.6.0 ()
Lots of bug fixes and stability fixes. Last 1.x release for rules_nodejs.

PR Close 
2020-04-14 10:12:59 -07:00
Greg Magolan
5b6ced5599 build: update to rules_nodejs 1.5.0 ()
### New stuff

* The `ts_project` rule is a simple wrapper around the TypeScript compiler, `tsc`. This is an alternative to `ts_library` but not a replacement. Read more about the trade-offs at https://bazelbuild.github.io/rules_nodejs/TypeScript#alternatives or read the [API docs](https://bazelbuild.github.io/rules_nodejs/TypeScript#ts_project)
* `pkg_npm` can now be used as a dependency within your repo as well as for publishing to npm. It provides a `LinkablePackageInfo` which is our internal API to pass package name/path to downstream compilations, essentially providing the "Lerna" feature.
* There is experimental support for Bazel's "worker mode" in `rollup_bundle`, which essentially puts Rollup in watch mode. Add the `supports_workers = True` attribute to opt-in.
* Better support for [pre-defined label variables](https://docs.bazel.build/versions/master/be/make-variables.html#predefined_label_variables) like `$(rootpath)` and `$(execpath)` - we no longer recommend using `$(location)` at all.

See release notes https://github.com/bazelbuild/rules_nodejs/releases/tag/1.5.0 for more info.

PR Close 
2020-03-30 11:25:16 -07:00
Greg Magolan
6f95bc915d build: update to rules_nodejs 1.4.1 ()
Minor bug fixes for Windows

PR Close 
2020-03-10 20:57:40 -04:00
Greg Magolan
f13ee3e692 build: update to rules_nodejs 1.4.0 ()
This brings in the 'silent' attribute in rollup_bundle to allow the suppression of verbose output in the zone.js package build.

PR Close 
2020-03-03 08:58:26 -08:00
Greg Magolan
ef2721b903 build: fix flakiness in integration/bazel by disabling symlinked_node_modules ()
The flakiness in integration/bazel-schematics is going to be a bit tricker as the WORKSPACE file is JIT generated by the architect build layer

PR Close 
2020-03-02 13:29:56 -08:00
Greg Magolan
d66a8c8189 build: update to rules_nodejs 1.3.0 ()
Brings in feat: builtin: expose @npm//foo__all_files filegroup that includes all files in the npm package (https://github.com/bazelbuild/rules_nodejs/commit/8d77827) that is needed for npm_integration_test @npm//puppeteer pkg_tar on OSX (as the OSX Chrrome libs are extracted to paths that contain spaces)

PR Close 
2020-02-13 16:29:32 -08:00
Greg Magolan
60018d265f build: update to rules_nodejs 1.2.2 ()
Fixes issue with yarn_install not following yarn-path in .yarnrc when bazel run from yarn with `yarn bazel ...` (rules_nodejs: fix: unset YARN_IGNORE_PATH in yarn_install before calling yarn )

PR Close 
2020-01-31 13:14:05 -08:00
Greg Magolan
da604310c6 build: update to rules_nodejs 1.2.1 ()
Fixes issue with conflicting linker module mappings introduced in 1.2.0

PR Close 
2020-01-31 13:14:05 -08:00
Greg Magolan
513c69169e build: update to rules_nodejs 1.2.0 ()
This brings in a fix so that yarn_install picks up the yarn-path attribute of the .yarnrc file.

PR Close 
2020-01-31 13:14:05 -08:00
Joey Perrott
8fbb48cc2e build: migrate to node@12.14.1 ()
PR Close 
2020-01-27 09:31:22 -08:00
Greg Magolan
436e7388c3 build: update to rules_nodejs 1.1.0 ()
This release resolves the bootstrap require patching issue with jasmine_node_test. Require patches are now included before any bootstrap scripts.

PR Close 
2020-01-15 14:58:07 -05:00
Greg Magolan
a4bbc35005 build: update to rules nodejs 1.0.1 ()
This brings in a few minor fixes including a better way to patch require for bootstrap scripts

Also remove install_source_map_support attribute from nodejs_binary targets This attribute will be removed from nodejs_binary in the future

PR Close 
2020-01-15 14:58:07 -05:00
Greg Magolan
96a61d21db build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 ()
For the purposes of the integration test the zone.js script & bundle script tags can just go into the source index.html itself. The purpose of the integration test is is to test @angular/bazel & ng_module & ng_package so there is no need to exercise html_insert_assets in integration/bazel.

PR Close 
2020-01-15 14:58:07 -05:00
atscott
7eddbe5d7f Revert "build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 ()" ()
This reverts commit 7203169c3d04b420d96ac4531137cd430d05e6cb.

PR Close 
2020-01-10 14:12:15 -08:00
atscott
6e5774b9a0 Revert "build: update to rules nodejs 1.0.1 ()" ()
This reverts commit 8042433cb09098c658fdec39c49edaeac2ac2c1d.

PR Close 
2020-01-10 14:12:15 -08:00
Greg Magolan
8042433cb0 build: update to rules nodejs 1.0.1 ()
This brings in a few minor fixes including a better way to patch require for bootstrap scripts.

PR Close 
2020-01-10 08:31:59 -08:00
Greg Magolan
7203169c3d build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 ()
For the purposes of the integration test the zone.js script & bundle script tags can just go into the source index.html itself. The purpose of the integration test is is to test @angular/bazel & ng_module & ng_package so there is no need to exercise html_insert_assets in integration/bazel.

PR Close 
2020-01-10 08:31:59 -08:00
Kara Erickson
ad987021ce Revert "build: update integration/bazel to rules_nodejs 0.42.1" ()
This reverts commit ec7ea77aa8d90d2ba32089e140ed716cb6aadb89 because it's part
of a PR that was red on CircleCI once it was merged into master (Windows tests
are only run on master, not on PRs).

PR Close 
2019-12-11 15:58:46 -08:00
Kara Erickson
caaeb21e59 Revert "build: update integration/bazel & @angular/bazel schematics to rules_nodejs 0.42.1" ()
This reverts commit 4e38a973b158ba397903199abe1e008b0627d81c because it's part of a PR
that was red on CircleCI once it was merged into master (Windows tests are only run
on master, not on PRs).

PR Close 
2019-12-11 15:58:46 -08:00
Greg Magolan
656607b640 build: update integration/bazel & @angular/bazel schematics to rules_nodejs 0.42.1 ()
This release brings a bug fix that https://github.com/angular/angular/pull/34243 is waiting on in order to remove rules_nodejs patches: fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (bazelbuild/rules_nodejs#1402)

PR Close 
2019-12-11 13:18:51 -08:00
Greg Magolan
dd3b27e971 build: update integration/bazel to rules_nodejs 0.42.1 ()
PR Close 
2019-12-11 13:18:51 -08:00
Greg Magolan
78912093f8 build: update to rules_nodejs 0.40.0 ()
This release includes nodejs cross-platform RBE fix in https://github.com/bazelbuild/rules_nodejs/pull/1320 and adds `args` to terser_minified in https://github.com/bazelbuild/rules_nodejs/pull/1317. These changes are needed to land a few outstanding PRs.

* build: fixes for cross-platform RBE 
* build: update zone.js to use the new rollup_bundle 

fix: fix

PR Close 
2019-11-13 13:33:38 -08:00
Greg Magolan
5ed6abe3df build: update to nodejs rules 0.39.1 ()
Pre-req for updating repo, integration & @bazel/schematics to Bazel 1.0.0 as this release brings in a fix for ts_library on Windows with Bazel 1.0.0+. See https://github.com/bazelbuild/rules_nodejs/issues/1307.

PR Close 
2019-10-29 14:36:33 -07:00
Greg Magolan
d8d8b8915c build: update to nodejs rules 0.39.0 ()
This release brings in some important fixes. In particular the 2 segment linker fix for the new rollup_bundle and the strict peerDeps requirement will be important for angular users that opt in to bazel. See https://github.com/bazelbuild/rules_nodejs/releases/tag/0.39.0 for more details.

PR Close 
2019-10-28 10:13:36 -07:00
Greg Magolan
4ee354da99 build: switch to @build_bazel_rules_nodejs//:index.bzl load point ()
The defs.bzl load point will be removed for the rules_nodejs 1.0 release.

PR Close 
2019-10-28 10:10:48 -07:00
Greg Magolan
0004896ff9 build: update to nodejs rules 0.38.3 ()
All providers now loaded from "@build_bazel_rules_nodejs//:providers.bzl".

PR Close 
2019-10-14 20:25:57 +00:00
Greg Magolan
5e694e519b build: update to nodejs rules 0.38.2 ()
Some changes in rules_nodejs providers folded into @angular/bazel package:
* `NodeModuleSources` renamed to `NpmPackageInfo` and now loaded from `//internal/common:npm_package_info.bzl`
* `collect_node_modules_aspect` renamed to `node_modules_aspect`
* new JS provider `JSNamedModuleInfo` now available and ng_module provides it using the `js_named_module_info` factory function
* sources_aspect has also been removed so the use of the `node_sources` legacy provider has been replaced with `JSNamedModuleInfo`.

PR Close 
2019-10-14 20:25:57 +00:00
Alex Eagle
cdfbda3d3b build: add missing http-server dep to bazel example ()
Also update rules_nodejs 0.38.0->0.38.1

PR Close 
2019-10-08 09:27:11 -07:00
Alex Eagle
f783244ad1 build: update to rules_nodejs 0.38 ()
PR Close 
2019-10-08 09:27:11 -07:00
Greg Magolan
c1346462db build: update to nodejs rules 0.37.1 ()
This release includes a ts_config runfiles fix so also cleaning up the one line work-around from .

This also updates to upstream rules_webtesting browser repositories load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") to fix a breaking change in the chromedriver distro. This bumps up the version of chromium to the version here: https://github.com/bazelbuild/rules_webtesting/blob/master/web/versioned/browsers-0.3.2.bzl

PR Close 
2019-09-25 11:29:12 -07:00
Greg Magolan
5f0d5e9ccf build: update to nodejs rules 0.34.0 and bazel 0.28.1 ()
nodejs rules 0.34.0 now includes protractor_web_test_suite rule (via new @bazel/protractor rule) so we switch to that location for that rule in this PR so that /packages/bazel/src/protractor can be removed in a future PR

this PR also brings in node toolchain support which was released in nodejs rules 0.33.0. this is a prerequisite for RBE for mac & windows users

bazel schematics also updated with the same. @bazel/bazel 0.28.1 npm package includes transitive dep on hide-bazel-files so we're able to remove an explicit dep on that as well.

PR Close 
2019-07-26 15:01:25 -07:00
Greg Magolan
361109d80f build: update to rules_nodejs 0.32.2 ()
Brings in ts_library fixes required to get angular/angular building after 0.32.0:
typescript: exclude typescript lib declarations in node_module_library transitive_declarations
typescript: remove override of @bazel/tsetse (+1 squashed commit)

@npm//node_modules/foobar:foobar.js labels changed to @npm//:node_modules/foobar/foobar.js with fix for bazelbuild/rules_nodejs#802

also updates to rules_rass commit compatible with rules_nodejs 0.32.0

PR Close 
2019-07-01 14:16:42 -07:00
Greg Magolan
b7a099d27e build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package ()
ctx.actions.declare_file now used in @angular/bazel ng_module rule as ctx.new_file is now deprecated. Fixes error:

```
        File "ng_module.bzl", line 272, in _expected_outs
                ctx.new_file(ctx.genfiles_dir, (ctx.label.name ..."))
Use ctx.actions.declare_file instead of ctx.new_file.
Use --incompatible_new_actions_api=false to temporarily disable this check.
```

This can be worked around with incompatible_new_actions_api flag but may as well fix it proper so downstream doesn't require this flag due to this code.

Also, depset() is no longer iterable by default without a flag. This required fixing in a few spots in @angular/bazel.

fix: foo

PR Close 
2019-07-01 14:16:42 -07:00
Alex Rickabaugh
280e8563f0 Revert "build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package ()" ()
This reverts commit 28d3bfc4169acf2eabefcf9e5917bbc84b24b54f.

Reason: this causes failures in g3 with i18n extraction. See .

PR Close 
2019-06-25 14:36:01 -07:00
Alex Rickabaugh
660800ca4e Revert "build: update to rules_nodejs 0.32.2 ()" ()
This reverts commit a38433f36b036cb2956066cb6a5843bef73a4de1.

Reason: this causes failures in g3 with i18n extraction. See .

PR Close 
2019-06-25 14:36:00 -07:00
Greg Magolan
a38433f36b build: update to rules_nodejs 0.32.2 ()
Brings in ts_library fixes required to get angular/angular building after 0.32.0:
typescript: exclude typescript lib declarations in node_module_library transitive_declarations
typescript: remove override of @bazel/tsetse (+1 squashed commit)

@npm//node_modules/foobar:foobar.js labels changed to @npm//:node_modules/foobar/foobar.js with fix for bazelbuild/rules_nodejs#802

also updates to rules_rass commit compatible with rules_nodejs 0.32.0

PR Close 
2019-06-25 10:21:07 -07:00
Greg Magolan
28d3bfc416 build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package ()
ctx.actions.declare_file now used in @angular/bazel ng_module rule as ctx.new_file is now deprecated. Fixes error:

```
        File "ng_module.bzl", line 272, in _expected_outs
                ctx.new_file(ctx.genfiles_dir, (ctx.label.name ..."))
Use ctx.actions.declare_file instead of ctx.new_file.
Use --incompatible_new_actions_api=false to temporarily disable this check.
```

This can be worked around with incompatible_new_actions_api flag but may as well fix it proper so downstream doesn't require this flag due to this code.

Also, depset() is no longer iterable by default without a flag. This required fixing in a few spots in @angular/bazel.

fix: foo

PR Close 
2019-06-25 10:21:06 -07:00
Alex Eagle
ef0b2cc74d build: convert entry_point to label ()
PR Close 
2019-06-11 00:03:11 +00:00
Greg Magolan
a794143820 build(bazel): update to nodejs rules 0.31.1 ()
* entry_point attribute of nodejs_binary & rollup_bundle is now a label
* symlinking of node_modules for yarn_install temporarily disabled (except for integration/bazel) until the fix for https://github.com/bazelbuild/bazel/issues/8487 makes it into a future bazel release

PR Close 
2019-06-11 00:03:11 +00:00
Greg Magolan
ba83d33dd0 build(bazel): update to nodejs rules 0.30.1 & bazel 0.26.0 ()
nodejs rules 0.30.1 has new feature to symlink node_modules with yarn_install and bazel 0.26.0 includes new managed_directories feature which enables this

PR Close 
2019-06-11 00:03:11 +00:00
Misko Hevery
fcdd784667 refactor(core): cleanup code with side-effects which was preventing tree-shaking ()
PR Close 
2019-06-03 09:01:51 -07:00
Alex Eagle
06efc340b6 build: update rules_nodejs and clean up bazel warnings ()
Preserve compatibility with rollup_bundle rule.
Add missing npm dependencies, which are now enforced by the strict_deps plugin in tsc_wrapped

PR Close 
2019-05-14 10:08:45 -07:00
Greg Magolan
7edfcf948f build(bazel): update to nodejs rules 0.27.12 and pin versions in @angular/bazel peer deps and for @bazel/schematics ()
PR Close 
2019-04-17 13:02:03 -07:00
Greg Magolan
7fbe138b1f build(bazel): update to nodejs rules 0.27.10 ()
PR Close 
2019-04-04 14:27:04 -07:00
Greg Magolan
7c1f73ac7b build(bazel): update to nodejs rules 0.27.9 ()
PR Close 
2019-04-02 10:27:14 -07:00
Greg Magolan
d9162a872d build(bazel): update to nodejs rules 0.27.8 ()
* fixes prodmode issue in integration/bazel

BREAKING CHANGE:

@bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json

PR Close 
2019-03-27 09:41:11 -07:00
Greg Magolan
d2b64cc008 build(bazel): revert back to yarn 1.12.1 under Bazel to fix Windows file-in-use issues ()
PR Close 
2019-03-20 18:36:13 -04:00
Greg Magolan
b460b26308 build(bazel): update to nodejs rules 0.27.7 ()
PR Close 
2019-03-19 23:39:37 -04:00
Greg Magolan
ea0e832e5f build(bazel): update to nodejs rules 0.27.6 ()
PR Close 
2019-03-19 23:39:36 -04:00
Matias Niemelä
fc8048ddaf build: update to nodejs rules 0.27 ()
PR Close 
2019-03-14 19:35:00 -07:00