Commit Graph

1027 Commits

Author SHA1 Message Date
Joey Perrott a48c8edd83 ci: update to latest version of sauce-connect (#39073)
Update to the latest version of sauce-connect, 4.6.2.

PR Close #39073
2020-10-05 12:53:27 -07:00
Joey Perrott c214cad2b4 Revert "build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#37727)" (#39097)
This reverts commit db56cf18ba.

PR Close #39097
2020-10-02 10:56:53 -07:00
Greg Magolan db56cf18ba build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#37727)
Updates to rules_nodejs 2.2.0. This is the first major release in 7 months and includes a number of features as well
as breaking changes.

Release notes: https://github.com/bazelbuild/rules_nodejs/releases/tag/2.0.0

Features of note for angular/angular:

* stdout/stderr/exit code capture; this could be potentially be useful

* TypeScript (ts_project); a simpler tsc rule that ts_library that can be used in the repo where ts_library is too
  heavy weight

Breaking changes of note for angular/angular:

* loading custom rules from npm packages: `ts_library` is no longer loaded from `@npm_bazel_typescript//:index.bzl`
  (which no longer exists) but is now loaded from `@npm//@bazel/typescript:index.bzl`

* with the loading changes above, `load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")` is
  no longer needed in the WORKSPACE which also means that yarn_install does not need to run unless building/testing
  a target that depends on @npm. In angular/angular this is a minor improvement as almost everything depends on @npm.

* @angular/bazel package is also updated in this PR to support the new load location; Angular + Bazel users that
  require it for ng_package (ng_module is no longer needed in OSS with Angular 10) will need to load from
  `@npm//@angular/bazel:index.bzl`. I investigated if it was possible to maintain backward compatability for the old
  load location `@npm_angular_bazel` but it is not since the package itself needs to be updated to load from
  `@npm//@bazel/typescript:index.bzl` instead of `@npm_bazel_typescript//:index.bzl` as it depends on ts_library
  internals for ng_module.

* runfiles.resolve will now throw instead of returning undefined to match behavior of node require

Other changes in angular/angular:

* integration/bazel has been updated to use both ng_module and ts_libary with use_angular_plugin=true.
  The latter is the recommended way for rules_nodejs users to compile Angular 10 with Ivy. Bazel + Angular ViewEngine is
  supported with @angular/bazel <= 9.0.5 and Angular <= 8. There is still Angular ViewEngine example on rules_nodejs
  https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular_view_engine on these older versions but users
  that want to update to Angular 10 and are on Bazel must switch to Ivy and at that point ts_library with
  use_angular_plugin=true is more performant that ng_module. Angular example in rules_nodejs is configured this way
  as well: https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular. As an aside, we also have an
  example of building Angular 10 with architect() rule directly instead of using ts_library with angular plugin:
  https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular_bazel_architect.

NB: ng_module is still required for angular/angular repository as it still builds ViewEngine & @angular/bazel
also provides the ng_package rule. ng_module can be removed in the future if ViewEngine is no longer needed in
angular repo.

* JSModuleInfo provider added to ng_module. this is for forward compat for future rules_nodejs versions.
  @josephperrott, this touches `packages/bazel/src/external.bzl` which will make the sync to g3 non-trivial.

PR Close #37727
2020-10-01 15:34:36 -07:00
Alex Rickabaugh 6ae1f198e6 release: cut the v11.0.0-next.4 release 2020-09-30 13:16:17 -04:00
Paul Gschwendtner 6af638d58e build: set up ora for progress spinners in dev-infra package (#38656)
Sets up the NPM `ora` package in the project and in dev-infra,
so that we can show progress spinners when needed. This is useful
in the publish release script when we wait for a pull request to
be merged.

PR Close #38656
2020-09-28 16:11:39 -04:00
Alex Rickabaugh 4baabf9cd3 release: cut the v11.0.0-next.3 release 2020-09-23 15:21:21 -04:00
Joey Perrott a85109fd72 release: cut the v11.0.0-next.2 release 2020-09-16 14:52:51 -07:00
Joey Perrott 593bd594e3 build: create temporary script for symbol extractor tests (#38819)
Creates a temporary script to running all symbol extractor tests.

PR Close #38819
2020-09-14 16:54:39 -07:00
atscott a69507a0ad release: cut the v11.0.0-next.1 release 2020-09-09 13:31:47 -07:00
Joey Perrott a6f3cd93a9 feat(dev-infra): check services/status information of the repository for caretaker (#38601)
The angular team relies on a number of services for hosting code, running CI, etc. This
tool allows for checking the operational status of all services at once as well as the current
state of the repository with respect to merge and triage ready issues and prs.

PR Close #38601
2020-09-01 13:05:30 -07:00
Joey Perrott 03dbcc7a56
build: update the package.json to 11.0.0-next.0 (#38667)
Update package.json version to reflect master targetting the next major
release train.
2020-09-01 10:35:41 -07:00
Joey Perrott de1cffb23b build: update the package.json to 10.2.0-next.0
When the rc was cut for 10.1.0-rc.0, the package.json for master should be updated
to to the following next version, in this case 10.2.0-next.0.
2020-08-27 15:59:52 -07:00
Misko Hevery fb06903237 release: cut the v10.1.0-rc.0 release 2020-08-26 11:57:57 -07:00
Misko Hevery d36828a7a1 release: cut the v10.1.0-next.8 release 2020-08-24 15:38:13 -07:00
Alan Agius 0fc44e0436 feat(compiler-cli): add support for TypeScript 4.0 (#38076)
With this change we add support for TypeScript 4.0

PR Close #38076
2020-08-24 13:06:59 -07:00
atscott 9af2de821c release: cut the v10.1.0-next.7 release 2020-08-19 09:35:47 -07:00
Joey Perrott f77fd5e02a feat(dev-infra): create a wizard for building commit messages (#38457)
Creates a wizard to walk through creating a commit message in the correct
template for commit messages in Angular repositories.

PR Close #38457
2020-08-18 17:01:14 -07:00
Joey Perrott 301513311e refactor(dev-infra): update yargs and typings for yargs (#38470)
Updating yargs and typings for the updated yargs module.

PR Close #38470
2020-08-17 15:30:32 -07:00
atscott 64cf087ae5 release: cut the v10.1.0-next.6 release 2020-08-17 13:23:09 -07:00
Joey Perrott f4ced74e3a feat(dev-infra): save invalid commit message attempts to be restored on next commit attempt (#38304)
When a commit message fails validation, rather than throwing out the commit message entirely
the commit message is saved into a draft file and restored on the next commit attempt.

PR Close #38304
2020-08-13 08:45:25 -07:00
Andrew Kushnir d6d7caa2a8 release: cut the v10.1.0-next.5 release 2020-08-12 09:57:20 -07:00
Joey Perrott a2e069fdda build: run formatting automatically on pre-commit hook (#38402)
Runs the `ng-dev format changed` command whenever the `git commit` command is
run.  As all changes which are checked by CI will require this check passing, this
change can prevent needless roundtrips to correct lint/formatting errors. This
automatic formatting can be bypassed with the `--no-verify` flag on the `git commit`
command.

PR Close #38402
2020-08-11 16:32:54 -07:00
Paul Gschwendtner f0766a4474 feat(dev-infra): provide organization-wide merge-tool label configuration (#38223)
Previously, each Angular repository had its own strategy/configuration
for merging pull requests and cherry-picking. We worked out a new
strategy for labeling/branching/versioning that should be the canonical
strategy for all actively maintained projects in the Angular organization.

This PR provides a `ng-dev` merge configuration that implements the
labeling/branching/merging as per the approved proposal.

See the following document for the proposal this commit is based on
for the merge script labeling/branching: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

The merge tool label configuration can be conveniently accesed
within each `.ng-dev` configuration, and can also be extended
if there are special labels on individual projects. This is one
of the reasons why the labels are not directly built into the
merge script. The script should remain unopinionated and flexible.

The configuration is conceptually powerful enough to achieve the
procedures as outlined in the versioning/branching/labeling proposal.

PR Close #38223
2020-08-05 10:53:17 -07:00
Alex Rickabaugh 2fcabe1557 release: cut the v10.1.0-next.4 release 2020-08-04 16:13:39 -07:00
Misko Hevery 57575e379f release: cut the v10.1.0-next.3 release 2020-07-28 15:17:32 -07:00
Andrew Kushnir 970d10c671 release: cut the v10.1.0-next.2 release 2020-07-22 09:55:21 -07:00
atscott e7c722574f release: cut the v10.1.0-next.1 release 2020-07-15 10:07:43 -07:00
Alex Rickabaugh 1f796e9479 release: cut the v10.1.0-next.0 release 2020-07-08 14:21:29 -07:00
Paul Gschwendtner 1601ee6f6a refactor(dev-infra): ng_rollup_bundle rule should leverage `@bazel/rollup` (#37623)
Refactors the `ng_rollup_bundle` rule to a macro that relies on
the `@bazel/rollup` package. This means that the rule no longer
deals with custom ESM5 flavour output, but rather only builds
prodmode ES2015 output. This matches the common build output
in Angular projects, and optimizations done in CLI where
ES2015 is the default optimization input.

The motiviation for this change is:

* Not duplicating rollup Bazel rules. Instead leveraging the official
rollup rule.
* Not dealing with a third TS output flavor in Bazel.The ESM5 flavour has the
potential of slowing down local development (as it requires compilation replaying)
* Updating the rule to be aligned with current CLI optimizations.

This also _fixes_ a bug that surfaced in the old rollup bundle rule.
Code that is unused, is not removed properly. The new rule fixes this by
setting the `toplevel` flag. This instructs terser to remove unused
definitions at top-level. This matches the optimization applied in CLI
projects. Notably the CLI doesn't need this flag, as code is always
wrapped by Webpack. Hence, the unused code eliding runs by default.

PR Close #37623
2020-06-22 10:55:28 -07:00
Joey Perrott a8af8551ec refactor(dev-infra): migrate github api in GitClient to rely on GithubClient (#37593)
GitClient now uses GithubClient for github API interactions.  GithubClient is
a class which extends Octokit and provides a member which allows for GraphQL
requests against the Github GraphQL api, as well as providing convenience methods
for common/repeated Github API requests.

PR Close #37593
2020-06-22 10:54:43 -07:00
crisbeto 87a679b210 build: import in-memory-web-api project (#37182)
Moves the `angular-in-memory-web-api` project into the main repository in order to make it easier to maintain and release.

PR Close #37182
2020-06-15 14:28:37 -07:00
Alan Agius aa8f1d569b build: add `@babel/preset-env` to dependencies (#37456)
`@babel/preset-env` is needed by for NGCC tests: 3569fdf451/packages/compiler-cli/ngcc/test/BUILD.bazel (L84)

However this is not as a depedency in the angular repo.

PR Close #37456
2020-06-11 12:05:34 -07:00
Alan Agius 5dba3bf1fd build: update CLI packages to the latest RC version for v10 (#37456)
With this change we update the Angular CLI repo and aio packages to the latest RC version for version 10.

PR Close #37456
2020-06-11 12:05:33 -07:00
Alan Agius 6651b4171d build: update to typescript 3.9.5 (#37456)
This TypeScript version contains the revert for the classes wrapped in IIFE change that was introduced in version 3.9.

PR Close #37456
2020-06-11 12:05:33 -07:00
Greg Magolan d887ba85ad build: update to latest stable Chromium 83.0.4103 in both rules_webtesting and puppeteer (#37427)
Also added in detailed instructions of the process to determine the URLs corresponding to Chromium version desired

PR Close #37427
2020-06-08 09:16:40 -07:00
Joey Perrott 0c75a06b1e build: upgrade to bazel 3.2.0 and rules_nodejs 1.7.0 (#37358)
Upgrade to rely on bazel version 3.2.0 and rules_nodejs 1.7.0.  This
is part of a routine update as new versions become available.

PR Close #37358
2020-06-08 09:15:50 -07:00
Joey Perrott 753fed285c build: add dev-infra to tslint selected files (#37233)
Adds the dev-infra files to the scope of files on which tslint is
enforced.  This will allow for better code management/conformance.

PR Close #37233
2020-06-04 12:44:46 -07:00
Kara Erickson cfb37b8994 release: cut the v10.0.0-rc.0 release 2020-05-21 10:00:31 -07:00
Igor Minar a1001f2ea0 fix(core): disable tsickle pass when producing APF packages (#37221)
As of TypeScript 3.9, the tsc emit is not compatible with Closure
Compiler due to
https://github.com/microsoft/TypeScript/pull/32011.

There is some hope that this will be fixed by a solution like the one
proposed in
https://github.com/microsoft/TypeScript/issues/38374 but currently it's
unclear if / when that will
happen.

Since the Closure support has been somewhat already broken, and the
tsickle pass has been a source
of headaches for some time for Angular packages, we are removing it for
now while we rethink our
strategy to make Angular Closure compatible outside of Google.

This change has no effect on our Closure compatibility within Google
which work well because all the
code is compiled from sources and passed through tsickle.

This change only disables the tsickle pass but doesn't remove it.

A follow up PR should either remove all the traces of tscikle or
re-enable the fixed version.

BREAKING CHANGE: Angular npm packages no longer contain jsdoc comments
to support Closure Compiler's advanced optimizations

The support for Closure compiler in Angular packages has been
experimental and broken for quite some
time.

As of TS3.9 Closure is unusable with the JavaScript emit. Please follow
https://github.com/microsoft/TypeScript/issues/38374 for more
information and updates.

If you used Closure compiler with Angular in the past, you will likely
be better off consuming
Angular packages built from sources directly rather than consuming the
version we publish on npm
which is primarily optimized for Webpack/Rollup + Terser build pipeline.

As a temporary workaround you might consider using your current build
pipeline with Closure flag
`--compilation_level=SIMPLE`. This flag will ensure that your build
pipeline produces buildable and
runnable artifacts, at the cost of increased payload size due to
advanced optimizations being disabled.

If you were affected by this change, please help us understand your
needs by leaving a comment on https://github.com/angular/angular/issues/37234.

PR Close #37221
2020-05-21 09:14:47 -07:00
Joey Perrott 59e7203a40 build: complete removal of bazel format yarn commands (#37148)
Remove bazel yarn format deprecation message to complete the removal of
formatting bazel related files via yarn command command.

PR Close #37148
2020-05-20 13:32:40 -07:00
Kara Erickson 325ad7eb53 release: cut the v10.0.0-next.9 release 2020-05-19 16:19:43 -07:00
Alan Agius 772c5b8f64 refactor: update to tslib 2.0 and move to direct dependencies (#37198)
Tslib version is bound to the TypeScript version used to compile the library. Thus, we shouldn't list `tslib` as a  `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed.

Reference: TOOL-1374 and TOOL-1375

Closes: #37188

PR Close #37198
2020-05-19 14:57:09 -07:00
Paul Gschwendtner 318e9372c9 feat(dev-infra): move merge script over from components repo (#37138)
Moves the merge script from the components repository over
to the shared dev-infra package. The merge script has been
orginally built for all Angular repositories, but we just
kept it in the components repo temporarily to test it.

Since everything went well on the components side, we now
move the script over and integrate it into the dev-infra package.

PR Close #37138
2020-05-18 11:50:07 -07:00
Kara Erickson 1754beb59c release: cut the v10.0.0-next.8 release 2020-05-18 09:21:37 -07:00
Alan Agius 13ba84731f build: prepare for TypeScript 3.9 (#36989)
- Fix several compilation errors
- Update @microsoft/api-extractor to be compatible with TypeScript 3.9

PR Close #36989
2020-05-14 10:50:28 -07:00
Alan Agius c42f35eb2f build: pin @microsoft/api-extractor to 7.7.11 (#36989)
Version 7.7.12 generates aliases for objects named the same as global symbols which breaks ts-api-guardian since it doesn't support aliases.

See: https://github.com/microsoft/rushstack/issues/1830

PR Close #36989
2020-05-14 10:50:27 -07:00
Misko Hevery 0731fc47e4 release: cut the v10.0.0-next.7 release 2020-05-13 15:28:42 -07:00
Joey Perrott 4e628a887a fix(dev-infra): update the config file loading for ng-dev to expect js (#36918)
Migrating to a js file for providing a configuration allows for more
extensive configuration at run time.  This allows for configs to include
logic and move beyond static values found in JSON files.

PR Close #36918
2020-05-08 09:38:25 -07:00
Alex Rickabaugh b6bc0aeb61 release: cut the v10.0.0-next.6 release 2020-05-07 15:52:58 -07:00
Paul Gschwendtner 4c92cf43cf feat(compiler-cli): report error if undecorated class with Angular features is discovered (#36921)
Previously in v9, we deprecated the pattern of undecorated base classes
that rely on Angular features. We ran a migration for this in version 9
and will run the same on in version 10 again.

To ensure that projects do not regress and start using the unsupported
pattern again, we report an error in ngtsc if such undecorated classes
are discovered.

We keep the compatibility code enabled in ngcc so that libraries
can be still be consumed, even if they have not been migrated yet.

Resolves FW-2130.

PR Close #36921
2020-05-06 15:06:10 -07:00