19057 Commits
Author SHA1 Message Date
Paul Gschwendtner f2dbf8663e build: update bazel nodejs fetch urls to fix 404 error (#42646)
It seems that the Bazel mirror of NodeJS is no longer available.
We override the `node_urls` to omit the Bazel mirror, so that
the LTS branch does not have any failing CI jobs.

PR Close #42646
2021-06-24 08:38:37 -07:00
Paul Gschwendtner f7610d5a19 ci: replace RBE instance name for components-repo-unit-tests job (#42646)
Temporarily replaces the RBE instance name for the
`components-repo-unit-tests` job until
https://github.com/angular/components/pull/23056 is available.

PR Close #42646
2021-06-24 08:38:37 -07:00
Joey Perrott 472eec0243 build: update to new remote instance name for RBE (#42646)
Update to use remote instance name, primary_instance, for RBE

PR Close #42646
2021-06-24 08:38:36 -07:00
Pete Bacon Darwin a7ff02f014 build(docs-infra): show a dist-tag when installing the CLI on non-stable versions (#42040)
It is important to use the correct major version of the Angular CLI when
following the examples in the tutorials. This commit provides a custom
element that renders an appropriate dist-tag in the setup step of
the tutorial when the docs are not in "stable" mode.

Fixes #39821

PR Close #42040
2021-05-13 13:56:19 -04:00
Zach Arend 318e7b8ce4 build: add script to publish v10-lts releases (#41631)
Adds a `/scripts/release/publish` script for releasing 10.2.x. Also
removes scripts for publishing `latest` and `next`. We are no longer
releasing `latest` and `next` off of this branch. This branch is only
for `v10-lts` releases.

PR Close #41631
2021-04-15 11:35:14 -07:00
Zach Arend 74eed46477 release: cut the v10.2.5 release 10.2.5 2021-04-14 14:23:38 -07:00
Alex Rickabaugh f630f331de fix(compiler-cli): show a more specific error for Ivy NgModules (#41534) (#41598)
When an Ivy NgModule is imported into a View Engine build, it doesn't have
metadata.json files that describe it as an NgModule, so it appears to VE
builds as a plain, undecorated class. The error message shown in this
situation generic and confusing, since it recommends adding an @NgModule
annotation to a class from a library.

This commit adds special detection into the View Engine compiler to give a
more specific error message when an Ivy NgModule is imported.

PR Close #41534

PR Close #41598
2021-04-14 09:38:40 -07:00
Misko Hevery ba8da742e3 fix(core): fix possible XSS attack in development through SSR (#40525)
This is a follow up fix for
https://github.com/angular/angular/pull/40136/commits/894286dd0c92b5af223364237e63798e18b14f58.

It turns out that comments can be closed in several ways:
- `<!-->`
- `<!-- -->`
- `<!-- --!>`

All of the above are valid ways to close comment per:
https://html.spec.whatwg.org/multipage/syntax.html#comments

The new fix surrounds `<` and `>` with zero width space so that it
renders in the same way, but it prevents the comment to be closed eagerly.

PR Close #40525
2021-03-18 10:06:02 -07:00
Joey Perrott 4a11226be7 release: cut the v10.2.4 release 10.2.4 2020-12-16 16:08:57 -08:00
Alan Agius 90570c030c fix(core): set ngDevMode to false when calling enableProdMode() (#40160)
The `ngDevMode` description also mentions that calling `enableProdMode` will set this the value to `false`.
https://github.com/angular/angular/blob/4610093c87975b6355f31a9c849351129908783a/packages/core/src/util/ng_dev_mode.ts#L22 which is currently not the case.

PR Close #40160
2020-12-16 14:30:41 -08:00
Misko Hevery 0b8e3d53ab fix(core): fix possible XSS attack in development through SSR. (#40152)
Escape the content of the strings so that it can be safely inserted into a comment node.
The issue is that HTML does not specify any way to escape comment end text inside the comment.
`<!-- The way you close a comment is with "-->". -->`. Above the `"-->"` is meant to be text
not an end to the comment. This can be created programmatically through DOM APIs.

```
div.innerHTML = div.innerHTML
```
One would expect that the above code would be safe to do, but it turns out that because comment
text is not escaped, the comment may contain text which will prematurely close the comment
opening up the application for XSS attack. (In SSR we programmatically create comment nodes which
may contain such text and expect them to be safe.)
This function escapes the comment text by looking for the closing char sequence `-->` and replace
it with `-_-_>` where the `_` is a zero width space `\u200B`. The result is that if a comment
contains `-->` text it will render normally but it will not cause the HTML parser to close the
comment.

PR Close #40152
2020-12-16 14:16:10 -08:00
Pete Bacon Darwin 1806d6e0c5 build: update to latest "yargs" package
The 15.x versions of `yargs` relied upon a version of `y18n` that
has a SNYK vulnerability.
This commit updates the overall project, and therefore also the
`localize` and `compiler-cli` packages to use the latest version
of `yargs` that does not depend upon the vulnerable `y18n`
version.
The AIO project was already on the latest `yargs` version and so
does not need upgrading.

Fixes #39743
2020-11-18 19:43:52 +00:00
Misko Hevery 0786c59835 release: cut the v10.2.3 release 10.2.3 2020-11-09 12:46:39 -08:00
George Kalpakas ae71b76089 ci: log commands output when deploying angular.io to Firebase (#39596)
In #39470, the `deploy-to-firebase.sh` script (used to deploy AIO to
Firebase when building an upstream branch), was replaced by an
equivalent JS script. In this new `deploy-to-firebase.js` script, we
were overly aggressive with suppressing command output, which made it
hard to investigate failures ([example failing CI job][1]).

This commit updates the `deploy-to-firebase.js` script to capture
command output as usual in the CI job logs. This makes the output
similar to the one generated by the old [deploy-to-firebase.sh][2]
script ([example CI logs][3]).

One concern with capturing command output is having the value of a
secret environment variables leaked in the logs. This is not the case
here, since:
1. The secret env vars are not printed from the commands that use them.
2. CircleCI will [mask the values of secret env vars][4] in the output.

As an extra precaution (although not strictly necessary), we run `yarn`
with the `--silent` option, which avoid echoing the executed yarn
commands.

[1]: https://circleci.com/gh/angular/angular/849310
[2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh
[3]: https://circleci.com/gh/angular/angular/848109
[4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking

PR Close #39596
2020-11-09 07:41:00 -08:00
George Kalpakas 1357d84ca9 build(docs-infra): print the git commit when deploying to Firebase (#39596)
The commit updates the AIO deployment script to also print the commit
SHA. This makes it easier to check whether a version has been
successfully deployed, by comparing the commit SHA from the CI job with
the SHA in the version string in the footer of the AIO app.

PR Close #39596
2020-11-09 07:40:59 -08:00
Alex Rickabaugh 861e4fa627 fix(compiler-cli): avoid duplicate diagnostics about unknown pipes (#39517)
TCB generation occasionally transforms binding expressions twice, which can
result in a `BindingPipe` operation being `resolve()`'d multiple times. When
the pipe does not exist, this caused multiple OOB diagnostics to be recorded
about the missing pipe.

This commit fixes the problem by making the OOB recorder track which pipe
expressions have had diagnostics produced already, and only producing them
once per expression.

PR Close #39517
2020-11-06 15:27:39 -08:00
Pete Bacon Darwin 1c6cf8a8c2 fix(compiler-cli): do not drop non-Angular decorators when downleveling (#39577)
There is a compiler transform that downlevels Angular class decorators
to static properties so that metadata is available for JIT compilation.
The transform was supposed to ignore non-Angular decorators but it was
actually completely dropping decorators that did not conform to a very
specific syntactic shape (i.e. the decorator was a simple identifier, or
a namespaced identifier).

This commit ensures that all non-Angular decorators are kepts as-is
even if they are built using a syntax that the Angular compiler does not
understand.

Fixes #39574

PR Close #39577
2020-11-06 09:21:53 -08:00
Athur Ming 7bd0133422 docs: typo fix for 'Intall' (#39585)
'Intall' should be 'Install'
PR Close #39585
2020-11-06 09:16:05 -08:00
Pete Bacon Darwin 2b684b7e5b fix(compiler): skipping leading whitespace should not break placeholder source-spans (#39589)
Tokenized text node may have leading whitespace skipped from their
source-span. But the source-span is used to compute where there are
interpolated blocks, resulting in placeholder nodes whose source-spans
are offset by the amount of skipped characters.

This fix uses the `fullStart` location of text source-spans for computing
the source-span of placeholders, so that they are accurate.

Fixes #39195

PR Close #39589
2020-11-06 09:09:48 -08:00
Pete Bacon Darwin ff31b431b8 refactor(compiler): capture fullStart locations when tokenizing (#39589)
This commit ensures that when leading whitespace is skipped by
the tokenizer, the original start location (before skipping) is captured
in the `fullStart` property of the token's source-span.

PR Close #39589
2020-11-06 09:09:48 -08:00
Pete Bacon Darwin 1aee8b345a refactor(compiler): store the fullStart location on ParseSourceSpans (#39589)
The lexer is able to skip leading trivia in the `start` location of tokens.
This makes the source-span more friendly since things like elements
appear to begin at the start of the opening tag, rather than at the
start of any leading whitespace, which could include newlines.

But some tooling requires the full source-span to be available, such
as when tokenizing a text span into an Angular expression.

This commit simply adds the `fullStart` location to the `ParseSourceSpan`
class, and ensures that places where such spans are cloned, this
property flows through too.

PR Close #39589
2020-11-06 09:09:48 -08:00
Pete Bacon Darwin e67a331b12 fix(compiler): ensure that i18n message-parts have the correct source-span (#39589)
In an i18n message, two placeholders next to each other must have
an "empty" message-part to separate them. Previously, the source-span
for this message-part was pointing to the wrong original location.
This caused problems in the generated source-maps and lead to extracted
i18n messages from being rendered incorrectly.

PR Close #39589
2020-11-06 09:09:48 -08:00
George Vrettos 08e077c0e0 docs: fix typo in the "Property Binding" guide (#39569)
PR Close #39569
2020-11-04 12:51:35 -08:00
Joey Perrott 16bc0fc3ec release: cut the v10.2.2 release 10.2.2 2020-11-04 12:32:09 -08:00
Aristeidis Bampakos 8929355a9d docs: fix typos in the "Attribute Binding" guide (#39562)
PR Close #39562
2020-11-04 11:42:45 -08:00
Joey Perrott 7ed0f0f7d0 fix(dev-infra): run caretaker checks asyncronously (#39086)
Run each check in the caretaker check process asyncronously.

PR Close #39086
2020-11-03 16:33:00 -08:00
GeopJr a644aae23d docs: fix Android 10 codename (#39399)
Change Android 10's codename from "X" to "Q"
PR Close #39399
2020-11-03 16:10:57 -08:00
Joey Perrott 250858a48e feat(dev-infra): provide tooling to check what branches a pr targets (#39504)
Create a command in the `ng-dev` toolset that allows user's to check
what branches a PR will merge into based on its targeting.

PR Close #39504
2020-11-03 14:55:25 -08:00
Joey Perrott aa3bd27cbf build: update dev dependency on @angular/cli to 10.2.0 (#39553)
Updating the @angular/cli dependency to match the @angular-devkit/*
versions.

PR Close #39553
2020-11-03 13:45:03 -08:00
Joey Perrott 90b4be182d fix(dev-infra): run fetches in the git client in quiet mode (#39503)
When fetch is run in normal mode, the `git-fetch-pack` plumbing command
outputs progress to stderr.  Since this is unnecessary progress
information for ng-dev usages, it should be suppressed instead.

PR Close #39503
2020-11-02 16:41:47 -08:00