Commit graph

26104 commits

Author SHA1 Message Date
Matthieu Riegler
f2c8ac5335 refactor(service-worker): removing some todos (#48707)
Removing some outdated/unnecessary todos.

PR Close #48707
2023-01-24 16:40:23 +00:00
Matthieu Riegler
82c8b7ae9e build(docs-infra): replace base64 images for stackblitz by svgs (#48774)
PNG converted to base64 don't work on stackblitz.
As stackblitz does't support binary files for dynamicaly created projects, we now use only svgs.

Fixes: #48773

PR Close #48774
2023-01-24 16:39:28 +00:00
Yann Thomas LE MOIGNE
a63983d1ba build: Fix version of images in recommended-Dockerfile. node:14-browsers doesn't exist anymore in Dockerhub (#48803)
Change the version of recommended-Dockerfile image to cim/node:16.13-browsers.

Closes #48802

PR Close #48803
2023-01-24 16:38:32 +00:00
Angular Robot
0ad013670e build: update eslint dependencies to v5.49.0 (#48818)
See associated pull request for more information.

PR Close #48818
2023-01-24 16:37:36 +00:00
Paul Gschwendtner
f54448c0e9 build: remove unused build optimizer dependency (#48797)
This dependency is no longer used and causes other versions
of e.g. typescript to be installed. We should remove it.

PR Close #48797
2023-01-23 13:39:04 +00:00
Paul Gschwendtner
55d00a7014 build: update lock file to reflect latest package.json (#48797)
It looks like running `yarn` in the repository results in some
lock file changes. Likely due to a rebase and changes landing
in the meanwhile, the lock file became a little outdated.

This commit uploads the lock file as `yarn` suggests.

PR Close #48797
2023-01-23 13:39:04 +00:00
Paul Gschwendtner
b6e3840ed4 refactor(bazel): remove unnecessary banner stamping code (#48798)
The `ng_package` rule supports replacing `0.0.0-PLACEHOLDER`
in license files that are inserted as part of rollup. This
requires additional logic to detect stamping, reading the status
files and then replacing the placeholder.

All of this already handled as part of normal package substitutions
and we can replace this unnecessary complexity.

See: da50feb23f/internal/pkg_npm/pkg_npm.bzl (L195)

PR Close #48798
2023-01-20 18:39:22 +00:00
Alan Agius
840530ffd8 docs: update supported Chrome version description (#48782)
- Update Chrome supported version description to match other browsers.
- Updates browserslist configuration in build section to match supported browsers

PR Close #48782
2023-01-20 17:07:53 +00:00
Virginia Dooley
2d0ca73d73 docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47907)
PR Close #47907
2023-01-20 01:21:07 +00:00
Virginia Dooley
bca76ed43a docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47906)
docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made.  Restructuring or rewording sentences to be shorter and clearer.

docs: revised understanding doc and pullapprove.yml

PR Close #47906
2023-01-19 21:32:34 +00:00
Payam Valadkhan
08b72b77e3 refactor(bazel): Extract the helper patchNgHostWithFileNameToModuleName to its own file for 1P use (#48739)
Some 1P tools require to use the helper patchNgHostWithFileNameToModuleName, and the present location of this helper leads to circular depedency. So it is required to move this helper into a separate module to facilitate importing.

PR Close #48739
2023-01-19 17:34:57 +00:00
Andrew Kushnir
9e1e5ccdfe ci: increase payload size for an integration test app (#48772)
The most recent commit added extra logic that brought the payload size above the limit. Likely an actual limit was already pretty close to the threshold, so we are just updating the payload.

PR Close #48772
2023-01-18 13:32:42 -08:00
Andrew Scott
4dcab333ae fix(router): 'createUrlTreeFromSnapshot' with empty paths and named outlets (#48734)
The details of this commit are pretty thoroughly described in the tests
and code comments. In short, it is sometimes ambiguous where to apply commands in
a `SegmentGroup` tree that is created from an `ActivatedRoute` when
dealing with empty paths. This adjusts the strategy to tolerate more
ambiguity while still allowing developers to be explicit.

This is a fix-forward for b/265215141

PR Close #48734
2023-01-18 10:46:43 -08:00
Andrew Scott
b5137d82cc test(router): update createUrlTree tests to not use mocks (#48734)
The mocks in the tests make them hard to understand and they don't always test real router behavior

PR Close #48734
2023-01-18 10:46:43 -08:00
AleksanderBodurri
3a688cb5ec build(devtools): fix issue where esbuild configs were not being set properly in DevTools (#48762)
Previously, a createConfig helper function was created to consolidate common esbuild configurations for DevTools. This function is asynchronous, but when it was used to set the configuration in various esbuild config files, it was used as if it was synchronous.

This commit fixes this issue by wrapping the output of the function in await, so that it propagates the configurations to esbuild correctly.

PR Close #48762
2023-01-18 10:45:13 -08:00
Alan Agius
42ca9c0b02 docs: update documentation to use ng generate config and ng generate environments (#48757)
In Angular CLI 15.1  new sub commands to generate configuration and environments files were added. This commit updates several docs to mention these commands.

Closes #48364

PR Close #48757
2023-01-18 10:44:14 -08:00
Angular Robot
fe6a2bd9e2 build: update dependency rimraf to v4 (#48726)
See associated pull request for more information.

PR Close #48726
2023-01-18 10:43:21 -08:00
Andrew Kushnir
8377acd94f release: cut the v15.2.0-next.1 release 2023-01-18 10:26:02 -08:00
Andrew Kushnir
318d94d4e1 docs: release notes for the v15.1.1 release 2023-01-18 10:13:45 -08:00
Paul Gschwendtner
9130635eac test: update size golden to reflect Angular cross dependency updates (#48747)
The `main` bundle size has increased, as well as the CSS styles from
Angular Material. Only the `main` bundle exceeded the golden, but
we update all other entries to make future updates easier and to prevent
gradually getting closer and closer to the threshold.

Investigating/comparing the `main` bundles before and after the update
did not unveil any significant changes, except for thousands of
different identifiers, with different length due to mangling. That
seems to be the only reason for having exceeded the threshold.

Very likely there were more size-affecting changes over time. Also
for example the downleveling of class fields for Safari v15 support.
See: https://github.com/angular/angular-cli/issues/24355#issuecomment-1333477033

PR Close #48747
2023-01-17 10:46:44 -08:00
Angular Robot
1849ae2675 build: update cross-repo angular dependencies (#48747)
See associated pull request for more information.

PR Close #48747
2023-01-17 10:46:44 -08:00
Andrew Scott
fb7b8a95f2 docs: Fix example in breaking changes to apply to correct sentence (#48758)
The "for example..." was supposed to apply to the production code, not the test code sentence.

fixes #48744

PR Close #48758
2023-01-17 09:21:50 -08:00
Angular Robot
b99bd9ebf6 build: update eslint dependencies to v5.48.2 (#48756)
See associated pull request for more information.

PR Close #48756
2023-01-17 09:17:03 -08:00
Angular Robot
7840352dee build: update all non-major dependencies (#48755)
See associated pull request for more information.

PR Close #48755
2023-01-17 09:16:19 -08:00
Kristiyan Kostadinov
1e30baaaa7 test: remove usages of deprecated runSchematicAsync function (#48745)
Removes our usages of `runSchematicAsync` since it is deprecated.

PR Close #48745
2023-01-17 09:13:39 -08:00
Kristiyan Kostadinov
5e5e7d79d0 build: update Angular packages to 15.1.0 stable (#48745)
Bumps up the Angular package dependencies to 15.1.0 stable.

PR Close #48745
2023-01-17 09:13:39 -08:00
Kristiyan Kostadinov
6beff5e8d7 refactor(compiler): rework and expose APIs to be used in schematics (#48730)
Reworks some of the existing compiler APIs to make them easier to use in a schematic and exposes a few new ones to surface information we already had. High-level list of changes:
* `getPotentialImportsFor` now requires a class reference, instead of a `PotentialDirective | PotentialPipe`.
* New `getNgModuleMetadata` method has been added to the type checker.
* New `getPipeMetadata` method has been added to the type checker.
* New `getUsedDirectives` method has been added to the type checker.
* New `getUsedPipes` method has been added to the type checker.
* The `decorator` property was exposed on the `TypeCheckableDirectiveMeta`. The property was already present at runtime, but it wasn't specified on the interface.

PR Close #48730
2023-01-13 12:24:32 -08:00
Pawel Kozlowski
5f21c6d627 perf(common): avoid excessive DOM mutation in NgClass (#48433)
This commit represents rewrite of the NgClass directive to address
severe performance problem (excessive DOM mutation). The modified
algorithm removes all the known performance clifs and has number of
desirable properties:
- it is shorter and (arguably) easier to follow;
- drops usage of existing differs thus limiting dependencies on other
part of the code without increasing size of the directive;
- doesn't degrade any other performance metrics.

Fixes #25518

PR Close #48433
2023-01-13 10:38:54 -08:00
Pawel Kozlowski
26686a3395 refactor(common): remove unnecessary curly brackets (#48433)
Remove unnecessary curly brackets in tests.

PR Close #48433
2023-01-13 10:38:54 -08:00
ced
5bb1223737 refactor(router): remove unused parameter in navigation internal function (#48724)
The internal `cancelNavigationTransition` required an unused `router` parameter.

PR Close #48724
2023-01-13 10:37:25 -08:00
Angular Robot
914e7b052e build: update actions/cache digest to 58c146c (#48564)
See associated pull request for more information.

PR Close #48564
2023-01-13 10:35:51 -08:00
Angular Robot
5b1c7c10a0 build: update dependency @rollup/plugin-commonjs to v24 (#48530)
See associated pull request for more information.

PR Close #48530
2023-01-13 10:35:19 -08:00
Angular Robot
d47bd480c9 build: update scorecard action dependencies (#48465)
See associated pull request for more information.

PR Close #48465
2023-01-13 10:34:47 -08:00
Angular Robot
f03f20c8ba build: update actions/checkout digest to ac59398 (#48460)
See associated pull request for more information.

PR Close #48460
2023-01-13 10:33:47 -08:00
Angular Robot
34dda890ed build: update io_bazel_rules_sass digest to 57ade09 (#48407)
See associated pull request for more information.

PR Close #48407
2023-01-13 10:32:34 -08:00
Paul Gschwendtner
13f10de40e test: update code fixes spec to work with esm-cjs interop lint (#48731)
The TSLint rule for ESM/CJS interop was apparently not working
for a short period of time due to diverging TypeScript versions.

This commit fixes the lint warning to replace the type-only
import with a default import. Even thoughn not striclty needed
for types- the rule enforces a default import as that is the safer
approach for runtime imported symbols.

Also the rule is updated to not disallow `cluster` anymore. The
types for cluster do no allow for e.g. `cluster.Worker` if cluster
refers to the default import. The whole lint rule is not strictly
needed anymore since we build & test with ESM in this repo now!

PR Close #48731
2023-01-13 14:10:39 +00:00
Paul Gschwendtner
1898190c28 build: update ng-dev and account for stamping changes (#48731)
* updates ng-dev and build-tooling since the previous SHAs are
no longer existent after the CircleCI incident snapshot build removal.
* accounts for the new stamping variables.

PR Close #48731
2023-01-13 14:10:39 +00:00
Alex Rickabaugh
f00bf71411 fix(core): makeEnvironmentProviders should accept EnvironmentProviders (#48720)
`makeEnvironmentProviders` constructs the wrapped `EnvironmentProviders`
type, which can only be used in environment injectors (not element
injectors). It makes sense that `makeEnvironmentProviders` should be able
to accept existing `EnvironmentProviders`-wrapped providers, since it will
be providing the same guarantee, but the current types do not allow this.

This commit fixes the typings to allow nesting `EnvironmentProviders` and
adds a test to verify that it will work.

PR Close #48720
2023-01-12 13:47:59 -08:00
Dylan Hunn
4ae384fd61 feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used, both directly and via reexports. (#48354)
A previous PR introduced a new compiler abstraction that tracks *all* known exports and re-exports of Angular traits. This PR harnesses that abstraction in the language service, in order to allow automatic imports of pipes.

PR Close #48354
2023-01-12 13:46:46 -08:00
Dylan Hunn
141333411e feat(language-service): Introduce a new NgModuleIndex, and use it to suggest re-exports. (#48354)
NgModules can re-export other NgModules, which transitively includes all traits exported by the re-exported NgModule. We want to be able to suggest *all* re-exports of a component when trying to auto-import it.

Previously, we used an approximation when importing from NgModules: we looked at a Component's metadata, and just imported the declaring NgModule. However, this is not technically correct -- the declaring NgModule it is not necessarily the same one that exports it for the current scope. (Indeed, there could be multiple re-exports!) As a replacement, I have implemented a more general solution.

This PR introduces a new class on the template type checker, called `NgModuleIndex`. When queried, it conducts a depth-first-search over the NgModule import/export graph, in order to find all NgModules anywhere in the current dependency graph, as well as all exports of those NgModules. This allows the language service to suggest all of the re-exports, in addition to the original export.

PR Close #48354
2023-01-12 13:46:46 -08:00
Dylan Hunn
ea8b33934b refactor(compiler-cli): Make getKnown return an array of nodes. (#48354)
`MetadataReaderWithIndex.getKnown` currently returns an iterator. It will be easier to work with for upcoming usages if it returns an array instead.

PR Close #48354
2023-01-12 13:46:46 -08:00
Dylan Hunn
2a4c5b4391 refactor(language-service): Improve the quick fix auto-import tests. (#48354)
Currently, the auto-import tests are very difficult to debug, because the `expect`ations are buried several function calls deep, and also because the multi-line replacements are hard to deal with. The auto-import tests now use a different approach, which can be easily debugged from the failure message. In addition, several new tests have been added to cover more cases.

PR Close #48354
2023-01-12 13:46:46 -08:00
Konstantin Kharitonov
8802b4aab9 fix(common): Update Location to get a normalized URL valid in case a represented URL starts with the substring equals APP_BASE_HREF (#48489)
```ts
@NgModule({
  imports: [RouterModule.forRoot([{path: '/enigma', component: EnigmaComponent}])],
  providers: [{provide: APP_BASE_HREF, useValue: '/en'}]
})
export class AppModule {}
```

Navigating to `/enigma` will redirect to `/en/igma` not to `/en/enigma` as it expects

Fixes: #45744

PR Close #48489
2023-01-12 11:45:32 -08:00
Paul Gschwendtner
64967da78a ci: include branch name in update CLI help PRs (#48716)
This should make it easier to distinguish between PRs
as currently they same equivalent but actually target
different branches.

PR Close #48716
2023-01-12 11:44:51 -08:00
Bob Watson
0b57e24eb6 docs: add first-app-lesson-13 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson
1edf5874d7 docs: add first-app-lesson-12 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson
d2333b4d35 docs: add first-app-lesson-11 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson
25ec456b9f docs: add first-app-lesson-10 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson
d894e40dd5 docs: add first-app-lesson-09 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson
b3283bd271 docs: add first-app-lesson-08 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00