Commit graph

25 commits

Author SHA1 Message Date
Joey Perrott
50c7e132b5 test: use zone from npm instead of the locally built package for integration tests (#61947)
Use zone from npm for integration tests

PR Close #61947
2025-06-06 15:20:11 -07:00
Andrew Kushnir
599c45c380 build: update lock files for integration test apps (#60594)
This commit updates yarn.lock files for integration test apps.

PR Close #60594
2025-03-31 16:39:14 +00:00
Angular Robot
8a5f3197c0 build: update cross-repo angular dependencies (#57776)
See associated pull request for more information.

Closes #56387 as a pr takeover

PR Close #57776
2024-09-13 16:09:02 +02:00
Paul Gschwendtner
f0d63f17e2 build: update cross-repo angular dependencies (#56364)
This commit also performs lock file maintenance on all integration
tests, fixing some ambigous ESM/CJS dependency graph issues.

e.g.

```
Unknown error: Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/string-width/index.js from /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
------------------------------------------
```

Closes #56261.

PR Close #56364
2024-06-11 12:35:47 -07:00
Alan Agius
46acb55e76 build: update integration tests lock files (#55661)
This should fix CI.

PR Close #55661
2024-05-03 09:17:16 -07:00
Alan Agius
aeb3fe26cf build: remove tslint and codelyzer deps from integration tests (#55658)
These are redundant.

PR Close #55658
2024-05-03 08:15:41 -07:00
Joey Perrott
894c1c5f10 refactor: apply prettier formatting to integration (#54653)
Apply prettier formatting to integration directories

PR Close #54653
2024-04-02 20:42:04 +00:00
Paul Gschwendtner
4238ed8fb6 build: sort integration package.json dependencies (#49787)
This commits contains changes proposes by running `yarn install`
for these integration tests.

PR Close #49787
2023-04-11 10:26:43 -07:00
Paul Gschwendtner
63673ddd3f build: re-add lock files for integration tests (#49787)
The lock files for integration tests have been accidentally
removed with: 612eaca3c5

This commit re-adds them.

PR Close #49787
2023-04-11 10:26:42 -07:00
Alan Agius
6e26af52fa feat(bazel): (APF) Angular Package Format updates (#49559)
Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022

PR Close #49559
2023-03-23 08:18:45 -07:00
Andrew Scott
07cbaa3e28 Revert "feat(bazel): (APF) Angular Package Format updates (#49332)" (#49555)
This reverts commit 842d569a94.

PR Close #49555
2023-03-22 16:01:20 -07:00
Alan Agius
842d569a94 feat(bazel): (APF) Angular Package Format updates (#49332)
Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022

PR Close #49332
2023-03-22 14:00:19 -07:00
Alan Agius
612eaca3c5 build: update cross-repo dependencies to latest stable version (#48216)
With this change we update the cross-repo dependencies to the latest stable version

PR Close #48216
2022-11-29 12:29:46 -08:00
Paul Gschwendtner
64fd824f67 build: setup test targets for integration tests with new rule (#44238)
Sets up the test targets for integration tests with the new rule.
The targets will match the configuration of the previous integration
test setup (through the dictionary in a `bzl` file).

Note: We already add `setup_chromium` based on whether Chromium tests
run as part of this integration test. In a follow-up commit we can then
remove puppeteer and rely on the Bazel-managed version of Chromium.

PR Close #44238
2021-12-08 13:42:41 -05:00
Paul Gschwendtner
a47794272b test: update basic integration tests to work with new package output (#43431)
Basic integration tests are those which do not require significant
changes as others. The larger ones will have individual commits.

For v13, the NPM package output will always be using partial compilation
output. This makes the ngcc integration test fail because the actual
Angular framework packages are no longer processable. We fix this, and
keep the ngcc test coverage by relying on the v12.x framework packages
in the integration test.

The terser integration test needs to point to the new Flat ESM module
file location. We now output FESM2020 instead of FESM2015. This also
requires us to use the latest version of terser.

The `side-effects` test currently is not maintained by us and relies
on View Engine build output. In the partial compilation output the
partial declarations are not marked with `@PURE` and are not removed
therefore. We would need to update the side-effect test to use the
linker Babel plugin instead. This is currently out-of-scope though
so we disable the test for now.

PR Close #43431
2021-10-01 18:28:43 +00:00
JiaLiPassion
f8956adb73 build: update zone.js version to 0.11.3 (#39317)
Update the version of `zone.js` from 0.10.3 to 0.11.3 inside
Angular repo.

PR Close #39317
2020-11-12 13:51:29 -08:00
JiaLiPassion
d37939623f test(zone.js): test zone.js package with tgz (#38649)
Zone.js 0.11.0 release an empty bundle, and now the npm_package tests all target
bazel rule `npm_package`, but not `npm_package.pack`, and these two rules may
generate different results, for example, Zone.js 0.11.0's issue is `package.json`
define files array which make the bundle only include the files in the files array.
So this PR install the zone.js package from the archive generated from `npm_package.pack` rule.

PR Close #38649
2020-10-19 08:06:11 -07:00
Igor Minar
9dbb30f884 feat(bazel): simplify ng_package by dropping esm5 and fesm5 (#36944)
esm5 and fesm5 are no longer needed and have been deprecated in the past.

https://v9.angular.io/guide/deprecations#esm5-and-fesm5-code-formats-in-angular-npm-packages

This commit modifies ng_package to no longer distribute these two formats in npm packages
built by ng_package (e.g. @angular/core).

This commit intentionally doesn't fully clean up the ng_package rule to remove all traces of esm5 and fems5
build artifacts as that is a bigger cleanup and currently we are narrowing down the scope of this change
to the MVP needed for v10, which in this case is 'do not put esm5 and fesm5' into the npm packages.

More cleanup to follow: https://angular-team.atlassian.net/browse/FW-2143

BREAKING CHANGE: esm5 and fesm5 format is no longer distributed in
Angular's npm packages e.g. @angular/core

If you are not using Angular CLI to build your application or library,
and you need to be able to build es5 artifacts, then you will need to
downlevel the distributed Angular code to es5 on your own.

Angular CLI will automatically downlevel the code to es5 if differential
loading is enabled in the Angular project, so no action is required from
Angular CLI users.

PR Close #36944
2020-05-06 13:54:26 -07:00
JiaLiPassion
c5df9ce474 build(zone.js): update zone.js version to 0.10.3 (#36214)
PR Close #36214
2020-03-31 10:59:17 -07: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
Greg Magolan
414dd95a0b build: update lock files in other integration tests (#35049)
PR Close #35049
2020-02-11 13:16:53 -08:00
George Kalpakas
7f0d7f4d12 build: update lockfiles for integration projects (#33968)
In the `integration_test` CircleCI job, we run `yarn install` on all
projects in the `integration/` directory. If a project has no lockfile
or if the lockfile is out-of-sync with the corresponding `package.json`
file, then the installed dependency versions are no longer pinned, which
can result in different versions being installed between different runs
of the same job (if, for example, a new version is released for a
package) and breaks hermeticity.

This could be prevented by using the `--frozen-lockfile` option with
`yarn install`, but this is not possible with the current setup, because
yarn needs to be able to install the locally built Angular packages,
whose checksums will be different from the ones in the lockfile.
Therefore, we have to manually ensure that the lockfiles remain in-sync
with the corresponding `package.json` files for the rest of the
dependencies.

For example, previously, [cli-hello-world-lazy/yarn.lock][1] had an
entry for `@angular-devkit/build-angular@0.900.0-next.9` (pinned to
`0.900.0-next.9`), but [cli-hello-world-lazy/package.json][2] specified
the `@angular-devkit/build-angular` version as `^0.900.0-rc.0` (note the
leading caret). As a result, since the version in the lock file does not
much the one in `package.json`, the lockfile is ignored and the latest
available version that matches `^0.900.0-rc.0` is installed.

This, for example, started causing unrelated CI failures ([example][3]),
when `@angular-devkit/build-angular@9.0.0-rc.3` was released with a size
improvement.

This commit ensures that all integration projects have a lockfile and
that lockfiles are up-to-date (with the current `package.json` files).

[1]: https://github.com/angular/angular/blob/fc2f6b845/integration/cli-hello-world-lazy/yarn.lock#L13
[2]: https://github.com/angular/angular/blob/fc2f6b845/integration/cli-hello-world-lazy/package.json#L26
[3]: https://circleci.com/gh/angular/angular/535959#tests/containers/2

PR Close #33968
2019-11-26 16:08:32 -08:00
George Kalpakas
74b7d1ace1 test(ngcc): build zone.js from source in scripts/build-packages-dist.sh (#33733)
In #33046, internal uses of `zone.js` were switched to reference it
directly from source (built with Bazel) instead of npm. As a result, the
necessary scripts were updated to build `zone.js` as necessary. However,
some `integration/**/debug-test.sh` scripts were missed (apparently
because they are not used on CI, but only locally as helpers for
debugging the integration projects).

This commit updates the `scripts/build-packages-dist.sh` script to also
build `zone.js`, so that other scripts (such as the various
`debug-test.sh` scripts) can use it.

PR Close #33733
2019-11-12 09:55:16 -08:00
JiaLiPassion
8c6fb17d29 build: reference zone.js from source directly instead of npm. (#33046)
Close #32482

PR Close #33046
2019-11-06 00:48:34 +00:00
Filipe Silva
e1f51eaa55 feat(compiler-cli): export tooling definitions (#29929)
PR Close #29929
2019-04-17 17:23:01 -07:00