Commit Graph

276 Commits

Author SHA1 Message Date
Paul Gschwendtner 5349e46b46 build: update tslint to latest version (#35800)
The old version we currently use does not properly implement the
option to exclude files from within the `tslint.json` file.

PR Close #35800
2020-03-03 09:20:48 -08:00
Greg Magolan f13ee3e692 build: update to rules_nodejs 1.4.0 (#35813)
This brings in the 'silent' attribute in rollup_bundle to allow the suppression of verbose output in the zone.js package build.

PR Close #35813
2020-03-03 08:58:26 -08:00
Pete Bacon Darwin a55f7aeff0 build: enable IDE type checking of $localize code (#35711)
The `packages/localize/src/tools` folder was excluded
from the top level `tsconfig.json` which meant that in IDEs
these source files were not being given the correct configuration.
It was originally excluded because it required the native `node` typings
but this is no longer a requirement.

Removing this folder from the exclusion list exposed a new issue
where there was a typings mismatch between `@babel/...` sources
and the associated `@types/babel__...` typings packages.

A clean up of the package.json and yarn.lock appears to fix this.

PR Close #35711
2020-02-28 07:09:50 -08:00
Pete Bacon Darwin df816c9c80 feat(ngcc): implement source-map flattening (#35132)
The library used by ngcc to update the source files (MagicString) is able
to generate a source-map but it is not able to account for any previous
source-map that the input text is already associated with.

There have been various attempts to fix this but none have been very
successful, since it is not a trivial problem to solve.

This commit contains a novel approach that is able to load up a tree of
source-files connected by source-maps and flatten them down into a single
source-map that maps directly from the final generated file to the original
sources referenced by the intermediate source-maps.

PR Close #35132
2020-02-26 12:51:35 -08:00
Greg Magolan dde68ff954 build: add npm_integration_test && angular_integration_test (#33927)
* it's tricky to get out of the runfiles tree with `bazel test` as `BUILD_WORKSPACE_DIRECTORY` is not set but I employed a trick to read the `DO_NOT_BUILD_HERE` file that is one level up from `execroot` and that contains the workspace directory. This is experimental and if `bazel test //:test.debug` fails than `bazel run` is still guaranteed to work as  `BUILD_WORKSPACE_DIRECTORY` will be set in that context

* test //integration:bazel_test and //integration:bazel-schematics_test exclusively

* run "exclusive" and "manual" bazel-in-bazel integration tests in their own CI job as they take 8m+ to execute

```
//integration:bazel-schematics_test                                      PASSED in 317.2s
//integration:bazel_test                                                 PASSED in 167.8s
```

* Skip all integration tests that are now handled by angular_integration_test except the tests that are tracked for payload size; these are:
- cli-hello-world*
- hello_world__closure

* add & pin @babel deps as newer versions of babel break //packages/localize/src/tools/test:test

@babel/core dep had to be pinned to 7.6.4 or else //packages/localize/src/tools/test:test failed. Also //packages/localize uses @babel/generator, @babel/template, @babel/traverse & @babel/types so these deps were added to package.json as they were not being hoisted anymore from @babel/core transitive.

NB: integration/hello_world__systemjs_umd test must run with systemjs 0.20.0
NB: systemjs must be at 0.18.10 for legacy saucelabs job to pass
NB: With Bazel 2.0, the glob for the files to test `"integration/bazel/**"` is empty if integation/bazel is in .bazelignore. This glob worked under these conditions with 1.1.0. I did not bother testing with 1.2.x as not having integration/bazel in .bazelignore is correct.

PR Close #33927
2020-02-24 08:59:18 -08:00
Alan Agius 8cb1f65e7d build: update cli packages to latest versions (#35608)
PR Close #35608
2020-02-21 08:31:18 -08:00
Paul Gschwendtner 8e12707f88 build: remove dependency on `@types/chokidar` (#35371)
We recently updated chokidar to `3.0.0`. The latest version of
chokidar provides TypeScript types on its own and makes the extra
dependency on the `@types` unnecessary.

This seems to have caused the `build-packages-dist` script to fail with
an error like:

```
[strictDeps] transitive dependency on external/npm/node_modules/chokidar/types/index.d.ts
   not allowed. Please add the BUILD target to your rule's deps.
```

It's unclear why that happens, but a reasonable theory would be that
the TS compilation accidentally picked up the types from `chokidar`
instead of `@types/chokidar`, and the strict deps `@bazel/typescript`
check reported this as issue because it's not an explicit target dependency.

PR Close #35371
2020-02-19 12:49:52 -08:00
Greg Magolan 2780dcc487 build: update to @bazel/bazel 2.1.0 (#35430)
Includes new feature to honor .bazelignore in external repositories. rules_nodejs 1.3.0 now generates a .bazelignore for the @npm repository so that Bazel ignores the @npm//:node_modules folder.

PR Close #35430
2020-02-13 16:29:32 -08:00
Greg Magolan d66a8c8189 build: update to rules_nodejs 1.3.0 (#35430)
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 #35430
2020-02-13 16:29:32 -08:00
Joey Perrott 1530c28e05 ci: add verification of the pullapprove config (#35060)
Verify that all files in the repo are covered by the pullapprove config
and that all rules in the pullapprove config match at least one file
in the repo.

PR Close #35060
2020-02-12 16:39:13 -08:00
Greg Magolan acfd0edd38 test: use puppeteer in integration tests and to download correct chromedriver (#35049)
This means integration tests no longer need to depend on a $CI_CHROMEDRIVER_VERSION_ARG environment variable to specify which chromedriver version to download to match the locally installed chrome. This was bad DX and not having it specified was not reliable as webdriver-manager would not always download the chromedriver version to work with the locally installed chrome.

webdriver-manager update --gecko=false --standalone=false $CI_CHROMEDRIVER_VERSION_ARG is now replaced with node webdriver-manager-update.js in the root package.json, which checks which version of chrome puppeteer has come bundled with & downloads informs webdriver-manager to download the corresponding chrome driver version.

Integration tests now use "webdriver-manager": "file:../../node_modules/webdriver-manager" so they don't have to waste time calling webdriver-manager update in postinstall

"// resolutions": "Ensure a single version of webdriver-manager which comes from root node_modules that has already run webdriver-manager update",
"resolutions": {
"**/webdriver-manager": "file:../../node_modules/webdriver-manager"
}
This should speed up each integration postinstall by a few seconds.

Further, integration test package.json files link puppeteer via file:../../node_modules/puppeteer which is the ideal situation as the puppeteer post-install won't download chrome if it is already downloaded. In CI, since node_modules is cached it should not need to download Chrome either unless the node_modules cache is busted.

NB: each version of puppeteer comes bundles with a specific version of chrome. Root package.json & yarn.lock currently pull down puppeteer 2.1.0 which comes with chrome 80. See https://github.com/puppeteer/puppeteer#q-which-chromium-version-does-puppeteer-use for more info.

Only two references to CI_CHROMEDRIVER_VERSION_ARG left in integration tests at integration/bazel-schematics/test.sh which I'm not entirely sure how to get rid of it

Use a lightweight puppeteer=>chrome version mapping instead of launching chrome and calling browser.version()

Launching puppeteer headless chrome and calling browser.version() was a heavy-handed approach to determine the Chrome version. A small and easy to update mappings file is a better solution and it means that the `yarn install` step does not require chrome shared libs available on the system for its postinstall step

PR Close #35049
2020-02-11 13:16:52 -08:00
Filipe Silva c73d7181ae build: update @angular/cli to rc 14 (#35162)
PR Close #35162
2020-02-05 17:20:31 -08:00
Greg Magolan 60018d265f build: update to rules_nodejs 1.2.2 (#34961)
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 #1588)

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

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

PR Close #34961
2020-01-31 13:14:05 -08:00
Wagner Maciel 69b52903f0 build: update to @bazel/protractor@1.2.0 (#35068)
we need this to be able to control the protractor version via peer dep, so that
we can update benchpress to protractor 6

PR Close #35068
2020-01-31 11:14:47 -08:00
Alex Rickabaugh 37f39d6db5 build(compiler-cli): update to chokidar 3.x (#35047)
Update from chokidar 2.x to 3.x in ngc/ngtsc, to eliminate any possibility
of a security issue with a downstream dependency of the package.

FW-1809 #resolve

PR Close #35047
2020-01-30 08:41:13 -08:00
Igor Minar d5205a01cb build: update to @angular/cli@9.0.0-rc.11 (#35042)
PR Close #35042
2020-01-29 14:11:38 -08:00
Igor Minar c349cb2d16 build: update CLI to 9.0.0-rc.10 (#34965)
PR Close #34965
2020-01-27 09:22:58 -08:00
Igor Minar 241f0acfb4 build: explicitly define @babel/generator dep in package.json (#34974)
Previously we just happened to be able to use it because of npm hoisting.

PR Close #34974
2020-01-26 14:53:47 -08:00
Paul Gschwendtner fd3cfbb678 build: create bazel marco to test for circular dependencies (#34774)
Creates a Bazel macro that can be used to test packages for
circular dependencies. We face one limitation with Bazel:

 * Built packages use module imports, and not relative source file
 paths. This means we need custom resolution.

Fortunately, tools like `madge` support custom resolution.

Also removes the outdated `check-cycles` gulp task that
didn't catch circular dependencies. It seems like the test
became broken when we switched the packages-dist output to Bazel. It
breaks because the Bazel output doesn't use relative paths, but uses
the module imports. This will be handled in the new Bazel macro/rule.

PR Close #34774
2020-01-23 11:36:40 -08:00
Greg Magolan 48f8ca5483 build: upgrade to bazel 2.0.0 (#34877)
PR Close #34877
2020-01-23 10:05:05 -08:00
Filipe Silva 27b9eb5e38 build: use CLI rc.8 (#34788)
PR Close #34788
2020-01-17 13:42:41 -05:00
Greg Magolan 436e7388c3 build: update to rules_nodejs 1.1.0 (#34736)
This release resolves the bootstrap require patching issue with jasmine_node_test. Require patches are now included before any bootstrap scripts.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan a4bbc35005 build: update to rules nodejs 1.0.1 (#34736)
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 #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 99d73906a8 build: update to @angular/cli 9.0.0-rc.4 (#34736)
This brings in a required fix to allow for 0.0.0 dev version of @angular/core for integration testing. Without this the following error is now observed:

```
This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 0.0.0 was found instead.
```

NB: rc.7 breaks the cli-hello-world-ivy-i18n integration test

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 93c2df23bf build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34736)
Brings in the fix for stamping which was preventing many targets from getting cached.

PR Close #34736
2020-01-15 14:58:07 -05:00
Filipe Silva 2019b2c911 build: update tsickle to 0.38.0 (#33717)
This is the tsickle version that supports TypeScript 3.7.

PR Close #33717
2020-01-14 16:42:21 -08:00
Andrius 1f79e624d1 build: typescript 3.7 support (#33717)
This PR updates TypeScript version to 3.7 while retaining compatibility with TS3.6.

PR Close #33717
2020-01-14 16:42:21 -08:00
Igor Minar 4b534358bb build: update to @bazel/ibazel@0.11.1 (#34732)
motivation: keeping up to date and picking up new bugfixes for ibazel that could fix some weirdness
I see when using 0.10.3

PR Close #34732
2020-01-13 07:18:58 -08:00
atscott e88d652f2a Revert "build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34589)" (#34730)
This reverts commit cb6ffa1211.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott ae007513f5 Revert "build: update to @angular/cli 9.0.0-rc.4 (#34589)" (#34730)
This reverts commit 1ba6fd3f42.

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

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

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan 1ba6fd3f42 build: update to @angular/cli 9.0.0-rc.4 (#34589)
This brings in a required fix to allow for 0.0.0 dev version of @angular/core for integration testing. Without this the following error is now observed:

```
This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 0.0.0 was found instead.
```

NB: rc.7 breaks the cli-hello-world-ivy-i18n integration test

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan cb6ffa1211 build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34589)
Brings in the fix for stamping which was preventing many targets from getting cached.

PR Close #34589
2020-01-10 08:31:58 -08:00
George Kalpakas 39bf104a03 build: update `firebase-tools` to the latest version (#34682)
This fixes `Server Error. certificate has expired` errors that cause AIO
deployment to fail.
(Example CI failure: https://circleci.com/gh/angular/angular/578227)

PR Close #34682
2020-01-08 13:21:35 -08:00
Alex Rickabaugh b3398eee61 build: update firebase-tools to the latest version (#34667)
This should fix an expired certificate that is breaking AIO deployment jobs
on CircleCI.

PR Close #34667
2020-01-08 10:02:20 -08:00
dependabot[bot] c288975898 build: bump handlebars from 4.0.11 to 4.5.3 (#34586)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.0.11 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.0.11...v4.5.3)

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

PR Close #34586
2020-01-07 10:45:59 -08:00
Igor Minar 6e7ca05efc build: remove unused webpack npm dependency (#34366)
We no longer need it.

PR Close #34366
2019-12-12 13:14:01 -08:00
Greg Magolan ecb29de82f build: update to rules_nodejs 0.42.2 (#34243)
This release brings two bug fixes we're waiting on:
1) fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (https://github.com/bazelbuild/rules_nodejs/pull/1402), which is a pre-req for https://github.com/angular/angular/pull/34112
2) fix(typescript): fix for cross platform ts_devserver issue #1409 (https://github.com/bazelbuild/rules_nodejs/pull/1413) which resolves ts_devserver launcher template is platform specific #1409 (https://github.com/bazelbuild/rules_nodejs/issues/1409) --- this fixes an OSX developer workflow with --config=remote

This does not upgrade integration/bazel or integation/schematics. That will be done in another PR.

PR Close #34243
2019-12-05 10:20:31 -08:00
Greg Magolan bbce2ad7d4 build: update to nodejs rules 0.42.1 (#34073)
* This brings in a fix to the `@npm//foo:foo_files` targets for https://github.com/angular/angular/pull/33927 so the a rules_nodejs patch can be removed.
* It also brings a protractor_web_test fix that resolves the need for a work-around in /modules/playground/e2e_test/sourcemap/BUILD.bazel.

PR Close #34073
2019-12-02 11:02:38 -08:00
Igor Minar 3408468121 build: remove fsevents from package.json (#34058)
we no longer need it.

PR Close #34058
2019-12-02 10:56:30 -08:00
Igor Minar b15f86e1ce build: remove gulp-connect and cors npm dependencies (#34058)
we no longer need them.

PR Close #34058
2019-12-02 10:55:55 -08:00
Igor Minar ea37e82e69 build: consolidate @angular-devkit/build-angular to the root package.json (#34002)
This allows us to update the version of the package in a single place for all tests.

Notable exemption of this is aio which currently doesn't depend on anything installed in the root.

PR Close #34002
2019-12-02 10:49:12 -08:00
Greg Magolan c4335e2817 build: update to nodejs rules 0.41.0 (#33996)
This bring is changes to the @nodejs repository required for https://github.com/angular/angular/pull/33927. See release notes for more details: https://github.com/bazelbuild/rules_nodejs/releases/tag/0.41.0.

rules_nodejs is approaching 1.0 and breaking changes for that release are being made more frequently. In this release, the ts_devserver API changed and it no longer injects html script tags into a provided index.html file. The diff on this commit is large as this breaking change affects quite a few tests.

Also note that we don’t update @angular/bazel schematics and integration/bazel as 0.41.0 is not a recommended update for angular users yet due to the breaking changes in ts_devserver & web_package (now named pkg_web). When a suitable plain npm package that is in progress is finished then it will be possible to easily replace the html injection functionality removed from ts_devserver & pkg_web.

PR Close #33996
2019-11-26 16:09:32 -08:00
George Kalpakas 3f68377c3d ci: check versions of non-local integration project dependencies (#33968)
In order to keep integration tests on CI as determinitstic as possible,
we need to ensure that the same dependencies (including transitive ones)
are installed each time. One way to ensure that is using a lockfile
(such as `yarn.lock`) to pin the dependencies to exact versions. This
works as long as the lockfile itself is in-sync with the corresponding
`package.json`, which specifies the dependencies.

Ideally, we would run `yarn install` with the `--frozen-lockfile` option
to verify that the lockfile is in-sync with `package.json`, but we
cannot do that for integration projects, because we want to be able to
install the locally built Angular packages). Therefore, we must manually
esnure that the integration project lockfiles remain in-sync, which is
error-prone.

This commit introduces a helper script that performs some checks on each
project's (non-local) dependencies:
- Ensure that exact versions (not version ranges) are specified in
  `package.json`. This reduces the probability of installing a breaking
  version of a direct or transitive dependency, in case of an
  out-of-sync lockfile.
- Ensure that the lockfile is in-sync with `package.json` wrt these
  dependencies.

While these checks are not full-proof, they provide yet another line of
defense against indeterminism.

PR Close #33968
2019-11-26 16:08:33 -08:00
Igor Minar 3c335c3590 fix(bazel): update to tsickle 0.37.1 to fix peerDep warnings (#33788)
tsickle 0.37.1 is compatible with typescript 3.6, so we should use it and fix peerDep warnings from npm/yarn.

PR Close #33788
2019-11-22 13:13:01 -05:00
Filipe Silva e53375b7b6 build: update @schematics/angular to 9.0.0-rc.3 (#33955)
PR Close #33955
2019-11-21 09:17:18 -08:00
Filipe Silva 891708cfc9 build: update to Angular CLI 9.0.0-rc.3 (#33955)
Followup to https://github.com/angular/angular/pull/33337

PR Close #33955
2019-11-21 09:17:18 -08:00