Commit graph

21669 commits

Author SHA1 Message Date
dario-piotrowicz
cf338493bf refactor(compiler-cli): remove unused closureCompilerEnabled from NgtscProgram (#43148)
remove the NgtscProgram's private field closureCompilerEnabled as that
is not being used in the class itself

PR Close #43148
2021-08-16 17:19:53 -07:00
George Kalpakas
b9fd76e257 docs(router): use the correct live-example name in routing-overview.md (#43180)
The previously used code (`<live-example stackblitz="router">`) would
try to target the `router.stackblitz.json` file inside the
(non-existent) `routing-overview` example (same as the guide's name).

This commit fixes the code to correctly express the original intention
of targeting the default `stackblitz.json` file of the `router` example
with `<live-example name="router">`.

Fixes #43167

PR Close #43180
2021-08-16 17:18:28 -07:00
Pete Bacon Darwin
66f1962fa6 test(compiler): add a test for parsing multiline expressions in attributes (#43129)
This tests a scenario that was failing in an internal project.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
a6fab37789 test(compiler): check that the parser supports prematurely terminated interpolations (#43129)
Such interpolations turned up during internal testing at Google, so this
commit adds a test to prevent regressions.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
0f56b036b4 refactor(compiler): use === rather than == in the ml_parser (#43129)
This is a simple tidy up commit to move to the more specific `===`
comparison operator in the HTML lexer/parser.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
0d71bc6061 refactor(compiler): share isQuote() via chars.ts (#43129)
This function is general purpose and by moving it into the
`chars.ts` file along with similar helpers, it can be reused
in the lexer, for instance.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
c32bfe5860 refactor(compiler): remove cyclic dependencies (#43129)
This commit removes 9 cycles in the dependency graph of the compiler code.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
9e18b65e9a test(compiler-cli): clarify source-map expectations in compliance tests (#43129)
The compliance tests can check source-map segments against expectations
encoded into the expectation files. Previously, the encoding of the expected
segment was only delimited by whitespace, but this made it difficult to identify
segments that started or ended with whitespace.

Now these segment expectations are wrapped in double-quotes which makes
it easier to read and understand the expectation files.

PR Close #43129
2021-08-16 13:07:23 -07:00
Pete Bacon Darwin
c5250aebae refactor(ngcc): remove unused import (#43129)
This import is not used in the file, so can be removed.

PR Close #43129
2021-08-16 13:07:22 -07:00
Joey Perrott
564ad0622a build: uipdate to latest @angular/dev-infra-private-builds (#43179)
Update to the latest @angular/dev-infra as it includes the fix to no longer include
husky installs in the published package.json

PR Close #43179
2021-08-16 13:06:30 -07:00
Alan Agius
40ef4e0101 ci: configure renovate to manage GitHub workflow updates (#43146)
Update renovate config to allow GitHub workflow updates

PR Close #43146
2021-08-16 11:37:20 -07:00
Joey Perrott
c91cecddaa ci: update circle cache key (#43177)
Update the prefix used for the circle cache key to use new cache base.

PR Close #43177
2021-08-16 11:06:01 -07:00
TIffany Davis
6d9cac4f1a docs: add tmdavis to contributors (#43135)
PR Close #43135
2021-08-16 10:47:08 -07:00
Renovate Bot
6004afccdf build: update dependency entities to v3 (#43095)
PR Close #43095
2021-08-16 10:46:27 -07:00
Renovate Bot
d743dd9900 build: update dependency http-server to v13 (#43096)
PR Close #43096
2021-08-16 10:46:03 -07:00
Edoardo Dusi
85c345b011 refactor(common): change encoding function in httpparams for better performances and coding standards (#42998)
HttpParams uses custom encoding function "standardEncoding" to encode query string preserving specific charachters. This refactoring aims to improve performances and code quality of that function by using a RegExp and a Map object instead of a chain of replace functions.

PR Close #42998
2021-08-16 10:44:52 -07:00
Joey Perrott
19977b1bf1 build: add mainBranchName to github configuration (#43061)
Update the ng-dev config for Github to include the main branch name.

PR Close #43061
2021-08-16 10:44:27 -07:00
Joey Perrott
81e4257761 build: remove dev-infra directory and migrate to relying on @angular/dev-infra-private-builds (#43061)
Remove the dev-infra directory and complete the migration to using the code generated by the
angular/dev-infra repository.

PR Close #43061
2021-08-16 10:44:27 -07:00
Aristeidis Bampakos
30bf472597 docs: update Aristeidis bio in GDE list (#43164)
PR Close #43164
2021-08-16 09:39:06 -07:00
Andrew Scott
286b2807de fix(router): eagerly update internal state on browser-triggered navigations (#43102)
The management of `browserUrlTree` currently has several problems with
correctly tracking the actual state of the browser.

This change makes the Router eagerly update the `browserUrlTree` when
handling navigations triggered by browser events (i.e., not 'imperative'). This
is because with those types of navigations, the browser URL bar is
_already_ updated. If we do not update the internal tracking of the
`browserUrlTree`, we will be out of sync with the real URL if the
navigation is rejected.

It would be best if we could remove `browserUrlTree` completely, but doing that
would require a lot more investigation and is blocked by #27059 because
the SpyLocation used in tests does not emulate real browser behavior.

fixes #43101

PR Close #43102
2021-08-16 09:33:23 -07:00
ali
b3bb6ec161 docs: add example for template local variable (#43137)
PR Close #43137
2021-08-16 09:24:12 -07:00
dario-piotrowicz
971f8572d2 refactor(compiler-cli): remove extra 'diagnostic' from readResource comment (#43147)
remove the extra 'diagnostic' present in the comment for the
ResourceHost's readResource method

PR Close #43147
2021-08-16 09:23:39 -07:00
dario-piotrowicz
0c84f6fd52 refactor(compiler): fix lateron typo in i18n ExtractorHost (#43160)
fix typo put in the ExtractorHosts's resourceNameToFileName comment
in which "later on" is spelled "lateron"

PR Close #43160
2021-08-16 09:23:13 -07:00
Renovate Bot
b0b7ef2985 build: update dependency build_bazel_rules_nodejs to v3.8.0 (#43136)
PR Close #43136
2021-08-13 14:59:52 -07:00
Joey Perrott
2a1aa5867d ci: add breaking changes auto labeling action (#43141)
Automatically add/remove `breaking changes` label to PRs as needed based on whether
the PR contains a commit with a breaking change.

PR Close #43141
2021-08-13 14:58:45 -07:00
pichuser
470371f1b2 docs: fix description: "property decorator" (not parameter) (#43068) (#43128)
PR Close #43068

PR Close #43128
2021-08-12 15:36:59 -07:00
Renovate Bot
398be10262 build: update all non-major dependencies (#42922)
PR Close #42922
2021-08-12 15:36:07 -07:00
Andrew Scott
c7d305b072 refactor(compiler): Remove compileUndecoratedClasses config file (#43043)
This config file was added to support g3 patches. Now that the patch is removed internally,
we can remove the file completely

PR Close #43043
2021-08-12 15:35:07 -07:00
Theoklitos Bampouris
a2a9b917b5 docs: adjust description to code example (#43127)
Remove promise's then(...) callback from description to match the code example's async/await syntax.
PR Close #43127
2021-08-12 15:32:47 -07:00
ivanwonder
d5f9890c92 feat(language-service): auto-apply optional chaining on nullable symbol (#42995)
Support automatically inserts the optional chaining operator (`?.`)
when property access (`.`) is done on a nullable symbol.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1094

PR Close #42995
2021-08-12 09:23:21 -07:00
George Kalpakas
9fb79d38aa build(docs-infra): upgrade cli command docs sources to 81ba264f9 (#43114)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](a52ca2236...81ba264f9):

**Modified**
- help/build.json

PR Close #43114
2021-08-11 10:40:21 -07:00
Andrew Kushnir
1f1822216e
release: cut the v13.0.0-next.1 release (#43119) 2021-08-11 10:25:57 -07:00
Andrew Kushnir
817c386be3
docs: release notes for the v12.2.1 release (#43118) 2021-08-11 10:20:56 -07:00
Daniel Trevino
e25d35f4cb refactor(compiler-cli): add test for BananaInBoxCheck (#42984)
Create the test package for extended_template_diagnostics and add a unit
test for the `BananaInBoxCheck`.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
d6411c2729 refactor(compiler-cli): add BananaInBoxCheck to the template checks (#42984)
Add the implementation of a Template Check that ensures the correct
use of two-way binding syntax. Generates a warning when
'([foo])="bar"' is found instead of '[(foo)]="bar"'.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
9a0a2b6e75 refactor(compiler-cli): visit inputs and outputs for elements and templates (#42984)
This commit adds to the exisiting `RecursiveVisitor` and visits inputs
and outputs for elements and templates.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
29a5a90111 refactor(compiler-cli): move getSourceCodeForDiagnostic to utils (#42984)
Export `getSourceCodeForDiagnostic` from `ngtsc/testing` to make it
available for other packages. This will help confirm that the source
code is correct in other tests.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
29e2bc7d91 refactor(compiler-cli): move typecheck test utils into its own package (#42984)
This commit moves the test utils used in the typechecking tests into its
own package. This makes them available to be used in the tests of a
different package.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
be8a8e17a8 refactor(compiler-cli): introduce getExtendedTemplateDiagnosticsForComponent function (#42984)
Add function to get extended template diagnostics generated by all the template checks.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
c055cfe281 refactor(compiler-cli): make makeTemplateDiagnostic wrapper error (#42984)
specific

This commit makes the wrapper function `makeTemplateDiagnostic` take an
ErrorCode as a type for the `ts.Diagnostic`s to be generated.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Daniel Trevino
3a092d6cea refactor(compiler-cli): introduce extended package to typecheck with it's API (#42984)
This commit introduces //packages/compiler-cli/src/ngtsc/typecheck/extended
as a container for a new phase of diagnostics generation. The API provides an
interface for new template checks to implement and generate template diagnostics.

Refs #42966

PR Close #42984
2021-08-10 15:55:49 -07:00
Tim Gates
e3415e597e docs: Fix a few typos (#43051)
There are small typos in:
- aio/content/guide/universal.md
- aio/content/guide/upgrade.md
- aio/content/guide/workspace-config.md
- dev-infra/ng-dev.js
- integration/check-dependencies.js

Fixes:
- Should read `mergeable` rather than `mergable`.
- Should read `upgradeable` rather than `upgradable`.
- Should read `thresholds` rather than `threshholds`.
- Should read `lease` rather than `leage`.
- Should read `ignore` rather than `ingore`.
- Should read `bootstrapping` rather than `bootstraping`.

PR Close #43051
2021-08-10 11:59:29 -07:00
Erik Slack
596d533f97 docs: add angular community meetup and ngxp to community resources (#43103)
Invite people to get more involved with Angular's community via these

PR Close #43103
2021-08-10 11:56:22 -07:00
Amadou Sall
002d959fe5 docs: remove the mention of Stylus (#43013)
Stylus is not supported anymore by Angular, so it should be removed from the Angular docs

PR Close #43013
2021-08-10 11:55:35 -07:00
Andrew Kushnir
181adff213
Revert "build(dev-infra): exlude commit message filter from formatting (#43091)" (#43104)
This reverts commit 7edb128221.

The reason for the revert is the breakage of the merge tooling (`dev-infra/commit-message-filter.js: No such file or directory`).
2021-08-10 11:45:40 -07:00
Vugar_Abdullayev
7edb128221 build(dev-infra): exlude commit message filter from formatting (#43091)
exlude commit-message-filter.js from clang format and tslint

PR Close #43091
2021-08-10 10:44:35 -07:00
Andrew Kushnir
cb988aebb0 refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089)
It is necessary in order to distinguish 2 different reasons for referencing the compiled-in locale.

1. Some code just needs to pass the locale value on to logic that actually uses it.
2. Other code uses the locale value to select locale-specific user-visible data and behavior.

Code modified by this change is of the first kind and should use `goog.getLocale()` in the future.

Note: there are still references to the `goog.LOCALE` in Angular codebase, but they are of second type.

PR Close #43089
2021-08-10 10:35:26 -07:00
George Kalpakas
892bd929f2 build(docs-infra): upgrade cli command docs sources to a52ca2236 (#43093)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](cf835b898...a52ca2236):

**Modified**
- help/generate.json

PR Close #43093
2021-08-10 10:33:30 -07:00
George Kalpakas
6c3ad1f1a4 fix(docs-infra): correctly detect chunk load errors (#43088)
It seems that at some point (potentially with the switch to Webpack 5)
Webpack started using the full chunk name (instead of just a numeric
identifier) in `ChunkLoadError` messages. So the error messages changed
from:
```
ChunkLoadError: Loading chunk 2 failed.
```

...to:
```
ChunkLoadError: Loading chunk src_app_something_some_module_ts failed.
```

This commit updates the regex that is used to detect such errors (in
order to print ServiceWorker-related debug info) to correctly recognize
the new error message format.

PR Close #43088
2021-08-09 12:25:41 -07:00
Andrew Scott
bbad42310b fix(router): ensure check for match options is compatible with property renaming (#43086)
After renaming, 'paths' is not in routerLinkOptions since it's been renamed.

PR Close #43086
2021-08-09 10:26:07 -07:00