Commit Graph

4419 Commits

Author SHA1 Message Date
Alan Agius b3d9dea52b build(docs-infra): add correct types to tuples (#41596)
This is to fix the below error:
```
tools/firebase-test-utils/FirebaseRedirect.ts:17:50 - error TS2345: Argument of type '(string | RegExp)[][]' is not assignable to parameter of type 'ReplacementDetail[]'.
  Type '(string | RegExp)[]' is missing the following properties from type 'ReplacementDetail': 0, 1

17     return XRegExp.replaceEach(this.destination, [...paramReplacers, ...restReplacers]);
```

https://app.circleci.com/pipelines/github/angular/angular/31076/workflows/5fd3851e-ae9e-4d77-b0ef-366ba38a9088/jobs/961795

PR Close #41596
2021-04-13 11:54:15 -07:00
aschaap fe6002977e docs: change (+) operator to `Number` function to match code (#41570)
PR Close #41570
2021-04-12 21:08:21 -07:00
aschaap 5e8dcfd641 docs(docs-infra): fix (+) not accepting null error by using `Number` instead (#41570)
Fix unexpected error when following the tutorial (when going through it with stricter type checking enforced). While (+) converts a string to an integer, it does not account for the possibility that `this.route.snapshot.paramMap.get('id')` could return null (type: string | null). Since this null case is not a practical outcome, it is a matter of types; switching from (+) to the `Number` function eliminates this issue, making the tutorial more robust.
PR Close #41570
2021-04-12 21:08:21 -07:00
aschaap 3a61bb82b3 docs: replaced erroneous instances of `HeroDetailsComponent` with `HeroDetailComponent` (#41569)
PR Close #41569
2021-04-12 21:07:35 -07:00
Nishu Goel d27c8b4d9f docs: add Nishu Goel to GDE list (#41347)
PR Close #41347
2021-04-12 21:06:00 -07:00
Alan Cohen 319da894be docs: change ActivatedRouteStub code sample to work with strictNullChecks on (#41559)
convertToParamMap() does not accept undefined.
Fix code sample so it can be used in strict mode without requiring changes.

PR Close #41559
2021-04-12 21:01:39 -07:00
Alan Agius 852b5e366e build: update `@angular-devkit/build-angular` to use commit SHA (#41434)
This is a temporary workaround until the CLI version containing a fix for the regression caused by deacc74 is available on NPM.

Without this change CLI builds will fail with;
```
angularCompiler.getNextProgram is not a function
```

PR Close #41434
2021-04-12 16:46:29 -07:00
Pete Bacon Darwin 5600df28e9 build(docs-infra): update dgeni-packages dependency (#41434)
This update includes fixes that prevented us from updating
other dependencies.

PR Close #41434
2021-04-12 16:46:29 -07:00
Alan Agius ed7d288364 build: update several dependencies (#41434)
With this change we update several dependencies to avoid Renovate creating a lot of PRs during onboarding. We also remove yarn workspaces as after further analysis these are not needed.

Certain dependencies such as `@octokit/rest`, `remark` and `@babel/*` have not been updated as they require a decent amount of work to update, and it's best to leave them for a seperate PR.

PR Close #41434
2021-04-12 16:46:29 -07:00
JoostK 6ba67c6fff feat(compiler-cli): mark ability to use partial compilation mode as stable (#41518)
This commit marks the `compilationMode` compiler option as stable, such
that libraries can be compiled in partial compilation mode.

In partial compilation mode, the compiler's output changes from fully
compiled AOT definitions to an intermediate form using partial
declarations. This form is suitable to be published to NPM, which now
allows libraries to be compiled and published using the Ivy compiler.

Please be aware that libraries that have been compiled using this mode
can only be used in Angular 12 applications and up; they cannot be used
when Ivy is disabled (i.e. when using View Engine) or in versions of
Angular prior to 12. The `compilationMode` option has no effect if
`enableIvy: false` is used.

Closes #41496

PR Close #41518
2021-04-12 10:31:12 -07:00
Sagar Pandita 05cc3c8ee2 docs: remove 'ui-jar' from Resources (#41552)
This commit removes 'ui-jar' from Resources, since it is not
compatible with the latest versions of Angular.

Fixes #41030

PR Close #41552
2021-04-12 10:05:50 -07:00
Aristeidis Bampakos aa755c8853 docs: add entry for prod tsconfig in library files (#41512)
Add an entry for TypeScript configuration file used in production

PR Close #41512
2021-04-09 07:46:52 -07:00
Pete Bacon Darwin 0a4308f756 docs: fix typo in migration guide (#41447)
Also reformat the table to look nice :-)

PR Close #41447
2021-04-07 13:51:08 -07:00
Pete Bacon Darwin 14a64acb72 build(docs-infra): store search dictionary as a string (#41447)
Previously, the search index info file contained an array of strings that is
the dictionary of terms in the corpus.
Storing this as a space separated string reduces the size of the file.

PR Close #41447
2021-04-07 13:51:08 -07:00
Pete Bacon Darwin 65cd44e731 build(docs-infra): tidy up the generateKeywords processor (#41447)
The recent PR #41368 contained some changes that could be improved.

PR Close #41447
2021-04-07 13:51:08 -07:00
Joey Perrott c385e74454 build: rely on engines to prevent using npm for dependency install (#41477)
Rather than relying on a preinstall script, set `engine-strict` to `true` in a
project `.npmrc` file, relying on the `engines` having `npm` set to note that
yarn should be used instead.

---

Output from `npm install` changes from:
```
$ npm install

> angular-srcs@12.0.0-next.7 preinstall /usr/local/account/js/angular
> node tools/yarn/check-yarn.js

/usr/local/account/js/angular/tools/yarn/check-yarn.js:12
  throw new Error(
  ^

Error: Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/
    at Object.<anonymous> (/usr/local/account/js/angular/tools/yarn/check-yarn.js:12:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-srcs@12.0.0-next.7 preinstall: `node tools/yarn/check-yarn.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-srcs@12.0.0-next.7 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/local/account/.npm/_logs/2021-04-06T22_54_02_292Z-debug.log
```
to
```
$ npm install
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for angular-srcs@12.0.0-next.7: wanted: {"node":">=10.19.0 <13.0.0","yarn":">=1.22.4 <2","npm":"Plesae use yarn instead of NPM to install dependencies"} (current: {"node":"10.20.1","npm":"6.14.4"})
npm ERR! notsup Not compatible with your version of node/npm: angular-srcs@12.0.0-next.7
npm ERR! notsup Not compatible with your version of node/npm: angular-srcs@12.0.0-next.7
npm ERR! notsup Required: {"node":">=10.19.0 <13.0.0","yarn":">=1.22.4 <2","npm":"Plesae use yarn instead of NPM to install dependencies"}
npm ERR! notsup Actual:   {"npm":"6.14.4","node":"10.20.1"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/local/account/.npm/_logs/2021-04-06T22_53_23_912Z-debug.log
```

PR Close #41477
2021-04-07 12:05:01 -07:00
Zack DeRose 18d4446dc6 docs: add Zack DeRose to GDE resources (#41464)
PR Close #41464
2021-04-07 11:52:00 -07:00
Paul Muriel Biya-Bi 5a81490554 docs: use the right tag in the HeroesComponent's template snippet (#41473)
Based on the tutorial content of the Hero Editor, the tag to be used in
HeroesComponent's template snippet should be h2 and not h3.

PR Close #41473
2021-04-07 11:51:37 -07:00
George Kalpakas ae6c195c87 docs: fix link URL in NG0100 error page (#41484)
Fixes #41474

PR Close #41484
2021-04-07 10:36:49 -07:00
Joey Perrott 4a68e13d1b build: update package.json engines range for nodes in preparation for upgrade (#41472)
In preparation for upgrading to `node@14`, and dropping `node@10`, updating the engines
for local `package.json`s.

PR Close #41472
2021-04-06 12:46:31 -07:00
George Kalpakas 4ae57cabd8 build: correctly publish `angular-in-memory-web-api` as CI build artifact (#41429)
Previously, the `angular-in-memory-web-api` package was built in
`dist/packages-dist/misc/angular-in-memory-web-api/`. This was different
from other Angular packages, which were placed directly in
`dist/packages-dist/`. This caused the `create-package-archives.sh`
script to create an invalid `misc.tgz` archive (i.e. treating the
`misc/` subdirectory as a package).
See, for example, the artifacts [here][1].

This commit changes the build scripts to have the
`angular-in-memory-web-api` package built in
`dist/angular-in-memory-web-api-dist/`, similar to how the `zone.js`
package is handled. It also updates the CircleCI config to correctly
publish the `angular-in-memory-web-api` package to CI build artifacts.

[1]: https://circleci.com/gh/angular/angular/951491

PR Close #41429
2021-04-06 10:22:54 -07:00
George Kalpakas a623bf4e70 build(docs-infra): enable linting for `ng-packages-installer` scripts (#41429)
This commit enables linting for the scripts in
`aio/tools/ng-packages-installer/`. It also makes the necessary changes
to the files to make linting pass.

PR Close #41429
2021-04-06 10:22:53 -07:00
George Kalpakas d42019d412 build(docs-infra): update `eslint` and `eslint-plugin-jasmine` to latest versions (#41429)
This commit updates the `eslint` and `eslint-plugin-jasmine` packages to
latest versions to take advantage of latest fixes and improvements.

PR Close #41429
2021-04-06 10:22:53 -07:00
George Kalpakas 2a76d8419c build(docs-infra): upgrade cli command docs sources to 37b5f1c99 (#41444)
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](e240e5b7c...37b5f1c99):

**Modified**
- help/build.json
- help/extract-i18n.json

##
Relevant changes in
[commit range](ea073c560...37b5f1c99) since PR #41435:

**Modified**
- help/build.json

##
Closes #41435

PR Close #41444
2021-04-05 12:42:44 -07:00
George Kalpakas 180c1b555f fix(docs-infra): avoid auto-linking generic word `state` (#41438)
Since `state` is a generic word, this commit adds it to the list of
ignored words for auto-linking to avoid incorrectly auto-linking to the
[state()][1] animation helper. For example, see `/ngsw/state` in the
[ServiceWorker in production][2] guide.

[1]: https://v10.angular.io/api/animations/state
[2]: https://v10.angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information

PR Close #41438
2021-04-05 08:56:43 -07:00
Philipp_Lypniakov fcd190aa9c docs: fix grammar mistake in `glossary.md` ("can exported" --> "can be exported") (#41440)
PR Close #41440
2021-04-05 08:17:26 -07:00
Gabrielle Crevecoeur 03a46afc91 docs: Including Visual Studio (#41414)
Uploading how to use the Angular Language Service in Visual Studio
PR Close #41414
2021-04-02 10:53:37 -07:00
GChuf 46a97b985e build: Bump minimum required node version to 10.19.0 (#41390)
Critical security vulnerability fixed in node v 10.19.0
Other performance and security updates since node 10.9.0

PR Close #41390
2021-04-02 10:29:24 -07:00
George Kalpakas 18abd3ce01 build(docs-infra): upgrade cli command docs sources to e240e5b7c (#41411)
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](b6effecae...e240e5b7c):

**Modified**
- help/extract-i18n.json
- help/generate.json

##
Relevant changes in
[commit range](935b1fdee...e240e5b7c) since PR #41394:

**Modified**
- help/generate.json

##
Closes #41394

PR Close #41411
2021-04-01 12:07:45 -07:00
Pete Bacon Darwin fccffc647b refactor(docs-infra): include more info in search index data (#41368)
The AIO search index is built in a WebWorker on the browser from a set
of page information that is downloaded as a JSON file (`search-data.json`).
We want to keep this file as small as possible while providing enough
data to generate a useful index to query against.

Previously, we only included one copy of each (non-ignored) term from each
doc but this prevents more subtle ranking of query results, since the number
of occurences of a term in a doc is lost.

This commit changes the generated file in the following ways:

- All non-ignored terms are now included in the order in which they appear
  in the doc.
- The terms are indexed into a dictonary to avoid the text of the term being
  repeated in every doc that contains the term.
- Each term is pre-"stemmed" using the same Porter Stemming algorith that the
  Lunr search engine uses.

The web-worker has been updated to decode the new format of the file.
Now that all terms are included, it may enable some level of phrase based
matching in the future.

The size of the generated file is considerably larger than previously, but
on production HTTP servers the data is sent compressed, which reduces the
size dramatically.

PR Close #41368
2021-04-01 12:02:37 -07:00
Pete Bacon Darwin 55f7f1d446 feat(docs-infra): improve search query processing (#41368)
This commit tries to improve the search results by processing
the query and attempting progressively less restrictive searches
until a non-zero set of pages is matched.

The new procesing includes:

* stripping off quote marks, which were causing searches to fail
* first attempting to match pages where ALL the query terms exist
* second attempting to match pages where ANY of the query terms exist
* third attempting to match pages where the title contains partial word matches

The first query attempt approximates, quite well, the idea of searching
for multi-word phrases. This is given the technical nature of the terms
and the fairly small size of the corpus.

PR Close #41368
2021-04-01 12:02:37 -07:00
George Kalpakas 3470ea17d5 fix(docs-infra): increase the max width of the `file-not-found` page (#41275)
Previously, the max width of the `file-not-found` page was limited to
50rem (800px by default). This allowed little space for showing
potentially helpful search results, which are shown in columns).

This commit increases the max width of the `file-not-found` page to
84rem (1344px by default) to allow search results to be visible without
requiring scrolling. This will not negatively affect UX, because the
page uses a multi-column layout and therefore there will rarely be long
lines of text to scan.

PR Close #41275
2021-04-01 11:36:44 -07:00
George Kalpakas 3cda3e6a32 fix(docs-infra): correctly show search results on narrow screens (#41275)
Previously, some part of the search results would be hidden and
inaccessible on narrow screens. This was caused by an issue with the
flexbox layout. See [here][1] for more info on the issue and the
available solutions.
NOTE: This issue affected both the search results shown when using the
search box (on the top right of the page) as well as the search results
shown in the `file-not-found` page.

This commit changes how the layout of search results is achieved to
ensure they are always accessible via scrolling on all screen sizes
(while keeping the same layout on larger screens).

Before: ![search results at 768px before][2]
After: ![search results at 768px after][3]

[1]: https://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container#33455342
[2]: https://user-images.githubusercontent.com/8604205/111772790-efe2ac00-88b5-11eb-925d-a80faeaa5369.png
[3]: https://user-images.githubusercontent.com/8604205/111772810-f5d88d00-88b5-11eb-8b2a-60bdc3736ea3.png

PR Close #41275
2021-04-01 11:36:44 -07:00
Pete Bacon Darwin 7dfa446c4a fix(common): temporarily re-export and deprecate `XhrFactory` (#41393)
The moved `XhrFactory` still needs to be available from `@angular/common/http`
for some libraries that were built prior to 12.0.0, otherwise they cannot be
used in applications built post-12.0.0.

This commit adds back the re-export of `XhrFactory` and deprecates it.

PR Close #41393
2021-04-01 11:26:11 -07:00
George Kalpakas 6391a4a49d docs: fix `.docs-card` tooltip and footer text in `docs` guide (#41250)
This commit updates the tooltip and footer description of the
"What is Angular" card in the `docs` guide to better match the card's
content. (It seems that the old content was copied/pasted from a
different card.)

It also updates the tooltip of the "Hello World" card to better describe
the card's purpose.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas e8a2e81e06 docs: correctly style alert in `updating-content-github-ui` guide (#41250)
This commit replaces the unknown `is-warning` CSS class from an alert in
the `updating-content-github-ui` guide with the `is-important` CSS class
(that causes the alert to be given an orange-ish background).

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 8debe95fc3 refactor(docs-infra): consistently format `docs-card` elements in the guides (#41250)
This commit formats the `docs-card` elements used in
`contributors-guide-overview` and `docs` guides to have consistent
indentation and line-wrapping.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 8b9d98ec63 docs: several minor fixes/improvements to docs contributing guides (#41250)
This commit includes several minor fixes and improvements to the
`updating-content-github-ui` and `updating-search-keywords` guides.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas f190c41e50 docs: use dedicated anchors for links to `CONTRIBUTING.md` (#41250)
Previously, some links to specific sections of `CONTRIBUTING.md` were
using hashes automatically generated by GitHub based on the section
headings. This resulted in less readable hashes which were directly tied
to the heading text and thus less robust (i.e. more likely to break if
the heading was re-worded in the future).

This commit switches such links to use the dedicated anchors, which are
more succinct/readable and more stable.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 9629e232e0 docs: fix URLs in `reviewing-content` and `updating-search-keywords` guides (#41250)
This commit fixes some incorrect URLs in `reviewing-content` and
`updating-search-keywords` guides.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas bff7af4882 fix(docs-infra): add `updating-content-github-ui` guide to the sidenav (#41250)
It seems that the `updating-content-github-ui` guide was accidentally
omitted from the sidenav in #41061.

This commit adds the guide to the sidenav.

PR Close #41250
2021-04-01 11:19:57 -07:00
Pete Bacon Darwin a371646a37 build: update yargs dependency to 16.2.0. (#41351)
This avoids a vulnerability in the transitive y18n dependency.

Fixes #41215

PR Close #41351
2021-03-30 16:59:38 -07:00
profanis b75d02cf88 docs: describe how to run tests in GitLab CI (#40411)
The documentation has a very useful configuration for Travis and CircleCI but not for GitLab CI.
So, I thought that might be useful to have that as well.

PR Close #40411
2021-03-30 16:53:30 -07:00
Obumuneme Nwabude d35751d442 docs(docs-infra): update docs on configuring project for Travis CI (#37473)
Remove sudo since it no longer has use in Travis CI build configurations.
Change chrome addons to use the latest required method.
Remove dist to make the Travis CI builds run in the latest Ubuntu release: Xenial.
This because Trusty uses an older version of Chrome which is not supported
by the current the latest Chrome Driver, used in ng e2e tests.

Fixes #36451

PR Close #37473
2021-03-30 16:45:32 -07:00
Yvonne Allen da22d4904c docs: review and update components overview guide (#41263)
* add links to navigate to the create workspace and application and install Angular CLI how-to steps for easy navigation
* add reviewed tag with date guide was reviewed

PR Close #41263
2021-03-30 16:44:01 -07:00
Alan Agius 300d6d1e38 build(docs-infra): support building the local `angular-in-memory-web-api` package in `NgPackagesInstaller` (#41313)
In some cases, we want to test the AIO app or docs examples against the locally built `angular-in-memory-web-api` for example to ensure that the changes in a commit do not introduce a breaking changes.

PR Close #41313
2021-03-29 15:14:16 -07:00
Zach Arend dd82c8e9f4 docs(docs-infra): add Zach Arend to contributors.json (#41325)
Add an entry for Zach Arend to the contributors.json file.

PR Close #41325
2021-03-24 13:34:51 -07:00
Marios Radis a92a89b0eb docs: spelling changes in app.e2e-spec and validate-spec files (#41326)
PR Close #41326
2021-03-23 14:37:12 -07:00
Leandro Diniz eba1289ec9 docs: format browser-support tables for GitHub markdown (#41122)
Format the HTML used in browser-support.md such that the tables
render correctly under GitHub markdown.

PR Close #41122
2021-03-23 13:08:35 -07:00
waterplea 6a6d332c06 docs: add Alexander Inkin to GDE list (#41310)
PR Close #41310
2021-03-23 11:18:26 -07:00