25966 Commits

Author SHA1 Message Date
Paul Gschwendtner ae34e6cabd fix(language-service): expose package.json for vscode extension resolution (#48678)
The VSCode extension looks for `@angular/language-service/package.json`
using `require`. This currently breaks as of the ESM changes because
we introduced the `exports` field but did not expose the `package.json`.

This commit fixes it.

Co-authored-By: Andrew Scott <atscott@google.com>
Co-authored-By: Dylan Hunn <dylhunn@gmail.com>

PR Close #48678
2023-01-10 09:13:55 -08:00
Kristiyan Kostadinov aa31d611c9 fix(compiler): resolve deprecation warning (#48652)
Fixes a deprecation warning that was being logged by compiler when generating aliases, because we weren't going through `ts.factory` to create an AST node.

PR Close #48652
2023-01-10 08:13:28 -08:00
Paul Gschwendtner 5a03d82986 test(docs-infra): increase jasmine default timeout for e2e specs (#48671)
Similar to the Saucelabs job, the jasmine default timeout can be
increased to avoid the common jasmine timeouts. We cannot control
how fast Selenium e.g. loads a page or not.

PR Close #48671
2023-01-10 08:10:23 -08:00
Alan Agius 6d183741ed fix(docs-infra): correctly read example type (#48665)
Prior to this change the universal example was broken as the example type was not retrieved correctly in bazel which caused the `_renameFile` method to be called with incorrect context.

Closes #48664

PR Close #48665
2023-01-10 08:09:55 -08:00
Alan Agius 128c4a604b docs: update universal example (#48665)
This change updates the universal example to align with latest CLI changes.

PR Close #48665
2023-01-10 08:09:54 -08:00
Angular Robot 62becec7d9 build: update dependency jsdom to v21 (#48660)
See associated pull request for more information.

PR Close #48660
2023-01-10 08:09:05 -08:00
Virginia Dooley 65c823b150 docs: Custom data Pipes doc, fixed live-example link. (#48656)
PR Close #48656
2023-01-10 08:08:07 -08:00
Andrew Kushnir 84d436e504 refactor(platform-browser): prepare the code to use MockPlatformLocation by default (#48651)
This commit prepares the code of the `BrowserTestingModule` to include the `MockPlatformLocation` by deafult in the future. With this change, the set of providers to add the `MockPlatformLocation` would be disabled by a flag, which will be switched in v16.

PR Close #48651
2023-01-10 08:06:37 -08:00
piyush132000 e4c70cbb4f docs: updated docs removed unnecessary imports and empty methods (#48628)
Removed empty methods and unnecessary imports in files

PR Close #48628
2023-01-10 08:06:05 -08:00
Tim Gates df0a94dc3a docs: fix simple typo, esnure -> ensure (#48588)
There is a small typo in integration/check-dependencies.js.

Should read `ensure` rather than `esnure`.

Signed-off-by: Tim Gates <tim.gates@iress.com>

PR Close #48588
2023-01-10 08:05:33 -08:00
Matthieu Riegler c139d2de1a docs(compiler-cli): fix commands to run compliance unit test (#48559)
PR Close #48559
2023-01-10 07:59:53 -08:00
Doug Parker d0f732a85c refactor(bazel): disables the Tsickle decorator transform (#47934)
This is no longer needed in google3 and actively impedes prodmode tests. See http://b/254054103#comment7 for deeper analysis.

This just turns off the transform for now, if it lands successfully I'll follow up with deleting the flag and dead code altogether.

PR Close #47934
2023-01-10 07:58:39 -08:00
Paul Gschwendtner 993217e192 fix(language-service): ship /api entry-point (#48670)
The `/api` entry-point was accidentally dropped when we switched the
compilation in the repo to full ESM- thinking the entry-point is not
needed externally.

We re-add it because the VSCode repo extension relies on it for checking
whether `ts.LanguageService` is an Angular one.

PR Close #48670
2023-01-09 10:13:34 -08:00
Greg Magolan 0e0d686d1e fix(language-service): update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48663)
2nd half of https://github.com/angular/vscode-ng-language-service/pull/1846. `npm_traslate_lock` in vscode-ng-language-service now has a data attribute so sed should only add another item to the list instead of adding a duplicate data attribute.

PR Close #48663
2023-01-09 10:13:07 -08:00
Matthieu Riegler 433dd5c66f fix(forms): Form provider FormsModule.withConfig return a FormsModule (#48526)
Because of a transitive dependency, FormsModule.withConfig wasn't providing FormModule.

fixes: #48519

PR Close #48526
2023-01-05 16:26:22 -08:00
Matthieu Riegler 10de92c68a refactor(forms): cleanup type any in forms tests (#48624)
Removing every type any in forms with a reference to #9100

PR Close #48624
2023-01-05 14:52:03 -08:00
Matthieu Riegler c5fd6a85ec docs: remove empty constructors & ngOnInit() (#48576)
PR Close #48576
2023-01-05 14:49:38 -08:00
Matthieu Riegler 4bca3fed19 docs: remove onInit from Tour Of Heroes. (#48576)
Following #24008, the schematics don't produce ngOnInit and the constructor. Let's reflect that in the Tour of Heroes tutorial.

Fixes #48575

PR Close #48576
2023-01-05 14:49:38 -08:00
Matthieu Riegler f3babe0458 refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/test/directives

PR Close #48476
2023-01-05 14:46:21 -08:00
Matthieu Riegler 406ae85e10 refactor(common): code cleaning (#48476)
* removing guard as console.warn is now widely supported
* Couldn't remove non-null assertion, waiting for TS support of getters with different types (microsoft/typescript#43662)

PR Close #48476
2023-01-05 14:46:20 -08:00
Matthieu Riegler be321f017a refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/directives

PR Close #48476
2023-01-05 14:46:20 -08:00
Matthieu Riegler 7d30528fbd refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/directives

PR Close #48476
2023-01-05 14:46:20 -08:00
Andrew Scott a9a7e9fb00 refactor(router): Remove files no longer in use (#48500)
These files exist to support internal patches that are no longer needed

PR Close #48500
2023-01-05 14:42:27 -08:00
Paul Gschwendtner c0015282ea ci: fix snapshot publish github credential preparation (#48648)
It looks like the wrapping in `&> /dev/null` breaks for some reason.
We don't need it as CircleCI will remove secrets from logs if they
would leak for some reason.

A simple echo is very unlikely ever printing its content to
stdout/stderr though.

PR Close #48648
2023-01-05 16:44:02 +00:00
Paul Gschwendtner 984d0fac92 ci: use snapshot deploy secret directly (#48644)
Instead of encoding the GitHub snapshot robot access token
in a file that needs to be decoded by an ambiguously named
secret called `KEY`, the token can be directly stored in the
secrets of CircleCI given easier maintenance and the same risk.

The leakage of the secret still means the GitHub token file could
be decoded.

We are switching to a similar model as in the components repo, which
also simplifies key rotations etc.

PR Close #48644
2023-01-05 15:15:59 +00:00
Matthieu Riegler cea2d192d9 refactor(compiler): Remove unnecessary assignment (#48478)
This is well known problem and has a opened issue at microsoft/typescript.  @ts-expect-error will highlight an error when this is fixed.

PR Close #48478
2023-01-04 12:23:51 -08:00
Renan Ferro b542f0f398 docs(docs-infra): update precedence of binding dynamic example and commentary (#48636)
PR Close #48636
2023-01-04 12:16:40 -08:00
Matthieu Riegler 10c10ee559 refactor(core): cleanup type any (#48623)
Removing every type any in core with a reference to #9100

PR Close #48623
2023-01-04 12:15:17 -08:00
Pawel Kozlowski 4621be3081 refactor(core): move attachDebugGetter to i18n specifc code (#48549)
The attachDebugGetter function is only used in the i18n specific code
so could be moved closer to the sole usage site instead of being
exported to the entire framework code. It also lets us remove the
entire packages/core/src/render3/util/debug_utils.ts file.

PR Close #48549
2023-01-04 12:14:30 -08:00
Pawel Kozlowski 9a1083c0ee refactor(core): remove unused attachDebugObject function (#48549)
This commit removes the unused attachDebugObject function.

PR Close #48549
2023-01-04 12:14:30 -08:00
piyush132000 98615c74b5 docs: updated docs removed unnecessary imports and empty methods (#48546)
Removed empty methods and unnecessary imports in files

PR Close #48546
2023-01-04 12:13:24 -08:00
Angular Robot 67ec04683c build: update eslint dependencies to v5.47.0 (#48548)
See associated pull request for more information.

PR Close #48548
2023-01-04 12:09:15 -08:00
Matthieu Riegler dfa69553a0 refactor(common): remove unnecessary parseFloat from ng_optimized_image directive. (#48527)
There is no need to parse clientWidth/clientHeight/naturalWidth/naturalHeight on HTMLImageElement as there is no sign of other types being returned on everygreen browers.

PR Close #48527
2023-01-04 12:07:03 -08:00
Matthieu Riegler 864a425de1 docs: fix typo on SkipSelf (#48511)
fixes #48506

PR Close #48511
2023-01-04 11:53:31 -08:00
Alan Agius 881ecb0936 fix(localize): add triple slash type reference on @angular/localize on `ng add (#48502)
This commits add a triple slash type reference to the `main.ts` of the project when running `ng add @angular/localize`. This is purely needed for IDE purposes so that `$localize` is available globally. For the compilations `@angular/localize` types are adding the the respective TS configs files.

This commits also add better support for using `@angular/localize` in `/// <reference types="@angular/localize" />`. To support this we need to move the global definition outside of a barrel file and into the index.ts file. Without this change the `$localize` method will not available globally when using triple slash type references.

Closes #48434

PR Close #48502
2023-01-04 11:50:45 -08:00
Alex Castle acff032f4b fix(common): Add data attribtue to NgOptimizedImage (#48497)
Add a tracking attribute in oder to be able to distinguish usages of NgOptimizedImage from standard images

PR Close #48497
2023-01-04 11:46:27 -08:00
robertIsaac 7bbe492383 docs: add NG0403.md for Bootstrapped NgModule doesn't specify which component to initialize error (#48483)
- update `errors.ts` to annotate the error NG0403, so that the runtime can add a link to that guide when an error is thrown
- update `application_ref_spec.ts` to include the new link of the error
- update `errors.md` as a result of running `yarn bazel test packages/core/test`

Fixes #47985

PR Close #48483
2023-01-04 09:59:25 -08:00
Paul Gschwendtner 788e7ca8b8 build: remove unused dependencies (#48641)
Removes unused dependencies introduced back when the devtools
were moved into the framework repo.

Most of these deps were added when the Bazel http-server from
the components repo was copied here

PR Close #48641
2023-01-04 09:55:52 -08:00
Paul Gschwendtner 2b8d8f0077 fix(compiler-cli): update @babel/core dependency and lock version (#48634)
Similar to how the `@babel/core` dependency is managed for the localize
NPM package, the version should be locked. Also the version should
correspond to the version we install for building & testing.

Currently the Babel version allowed by the compiler-cli may not
work given the ESM -> CJS interop. causing errors like:

```
import { types as t } from "@babel/core";
         ^^^^^
SyntaxError: Named export 'types' not found. The requested module '@babel/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@babel/core';
const { types: t } = pkg;
```

We can only be confident about the interop if we know the version
installed- is the one we test.

PR Close #48634
2023-01-03 16:36:50 +00:00
Paul Gschwendtner 87d2385994 build: switch from ng-comp-dev to canonical dev-infra preview Firebase project (#48630)
We are going with a single canonical dev-infra Firebase/GCP project
for previews. This commit switches to it.

PR Close #48630
2023-01-03 13:22:38 +00:00
mgechev d7ff276bce docs: hide state of js survey (#48578)
PR Close #48578
2023-01-02 12:19:50 +00:00
Vadim e88d3ae171 docs: fix typo in preconnect_link_checker.ts (#48595)
PR Close #48595
2023-01-02 12:17:52 +00:00
Alan Agius ac106cc432 build: remove duplicate license banners from FESM bundles (#48560)
Prior to this change the FESM bundles have the license banner duplicated multiple of times in each published file.

With this change we remove all the banners from the individual input files. A new banner will be appended at the top of the FESM using rollup's banner option.

While there is a rollup plugin on NPM to strip these banners (https://github.com/mjeanroy/rollup-plugin-strip-banner) we could not use this as it does not support `.mjs`.

PR Close #48560
2023-01-02 12:16:55 +00:00
Alan Agius e7c2249dd7 fix(bazel): remove duplicate license banners from FESM bundles (#48560)
Prior to this change the FESM bundles for the FW packages have the license banner duplicated hundreds of times in each published file.

With this change we remove all the banners from the individual input files. A new banner will be appended at the top of the FESM using rollup's banner option.

While there is a rollup plugin on NPM to strip these banners (https://github.com/mjeanroy/rollup-plugin-strip-banner) we could not use this as it does not support `.mjs`.

PR Close #48560
2023-01-02 12:16:55 +00:00
Derek Cormier 4ae66558bf build(bazel): improve remote caching for AIO local deps build (#48579)
Fix non-hermetic zipping of example zips by fixing the zip entry timestamps.

I also hardcoded stamp values in stable-status.txt and volatile-status.txt using the workspace status command for the aio_local_deps config to improve cache performance. The Bazel remote cache appears to not ignore volatile-status.txt when there are no other changes, unlike the local Bazel cache:

https://github.com/bazelbuild/bazel/issues/10075#issuecomment-546872111

PR Close #48579
2023-01-02 12:16:12 +00:00
Alan Agius 125b3df884 ci: remove redundant aio dependencies installation step (#48574)
Remove redundant aio dependencies installation step from update-events action as this action only uses built-in node.js APIs

PR Close #48574
2022-12-24 11:26:35 +00:00
Derek Cormier f64dae0806 build(bazel): prevent remote cache misses on dgeni build (#48585)
Using 'always' as the stamp attribute caused stable-status.txt
to always be included as an input, which has different values on
different ci executors causing a cache miss.

We run the regular aio build without stamping on ci so only include
status files when stamping is explicitly enabled.

PR Close #48585
2022-12-24 11:25:40 +00:00
Paul Gschwendtner ab13c9663a build: do not rely on CommonJS module global for Bazel karma saucelabs (#48573)
The Karma Saucelabs script for Bazel & Saucelabs relies on some CommonJS
specific features. This commit replaces it with an ESM-compatible
alternative so that it can execute because `nodejs_binary` requires ESM
files now.

PR Close #48573
2022-12-23 14:16:34 +00:00
piyush132000 d768fb7fe5 docs: updated docs removed unnecessary imports and empty methods (#48513)
Removed empty methods and unnecessary imports in files

PR Close #48513
2022-12-21 13:08:18 +00:00
Paul Gschwendtner 1513561ea4 build: only generate bazel saucelabs targets for //packages/ (#48554)
With the recent ESM changes we also started generating Saucelabs
targets for `//devtools` (as part of an effort to avoid code
duplication). We should skip Saucelabs targets for this package
because we don't intend to run them on Saucelabs and this whole
setup needs some more work (and we shouldn't change unexpectedly).

PR Close #48554
2022-12-21 12:58:28 +00:00