Commit Graph

356 Commits

Author SHA1 Message Date
Paul Gschwendtner 25f763cff8 feat(core): support TypeScript 4.3 (#42022)
Switches the repository to TypeScript 4.3 and the latest
version of tslib. This involves updating the peer dependency
ranges on `typescript` for the compiler CLI and for the Bazel
package. Tests for new TypeScript features have been added to
ensure compatibility with Angular's ngtsc compiler.

PR Close #42022
2021-06-04 11:17:09 -07:00
Renovate Bot f02382dfd4 build: update dependency lighthouse to v8 (#42462)
PR Close #42462
2021-06-03 10:50:29 -07:00
Renovate Bot f3f10140b5 build: lock file maintenance (#42264)
PR Close #42264
2021-06-02 13:16:58 -07:00
Renovate Bot 2b7dc15655 build: update dependency ts-node to v10 (#42257)
PR Close #42257
2021-06-01 14:12:37 -07:00
Renovate Bot 5babdb2284 build: update angular (#42379)
PR Close #42379
2021-06-01 12:51:54 -07:00
Renovate Bot d6bc61ab5f build: update angular (#42090)
PR Close #42090
2021-05-20 17:25:51 +00:00
Renovate Bot 5c44ec1b45 build: lock file maintenance (#42120)
PR Close #42120
2021-05-19 09:20:53 -07:00
Renovate Bot b7d161487f build: update dependency esbuild to ^0.12.0 (#42143)
PR Close #42143
2021-05-18 15:37:07 -07:00
Renovate Bot fdb3d3076e build: update angular (#42035)
PR Close #42035
2021-05-13 16:13:20 -04:00
Renovate Bot 45083bc302 build: lock file maintenance (#42015)
PR Close #42015
2021-05-13 13:32:27 -04:00
Renovate Bot 991ea6fc39 build: update all non-major dependencies (#41956)
PR Close #41956
2021-05-10 11:35:59 -04:00
Renovate Bot 3927e2529a build: update angular (#41955)
PR Close #41955
2021-05-07 10:03:36 -04:00
Renovate Bot 35fbd4f411 build: update dependency fs-extra to v10 (#41937)
PR Close #41937
2021-05-06 09:36:18 -04:00
Renovate Bot dac78d1ba1 build: update dependency yargs to v17 (#41920)
PR Close #41920
2021-05-04 08:31:47 -07:00
Renovate Bot f42796a8f5 build: lock file maintenance (#41924)
PR Close #41924
2021-05-03 14:27:06 -07:00
George Kalpakas 6967f3ca28 build(docs-infra): revert `watchr` to v3.0.1 to restore `docs-watch` performance (#41903)
[`watchr` v4.0.0][1] changes the way watched directories are
scanned/watched, thus causing a great increase in the consumed CPU and
RAM. This affects the performance of the `docs-watch` and transitively
`serve-and-sync` npm scripts.
(For reference, on my local machine it goes from 0% CPU and 275MB RAM
with v3.0.1 to 50% CPU and 10GB RAM with v4+.)

This commit pins `watchr` to version 3.0.1 (which is the latest version
that does not cause performance issues) and disabled automatic updates
via Renovate.

[1]: https://github.com/bevry/watchr/releases/tag/v4.0.0

PR Close #41903
2021-05-03 10:05:31 -07:00
Renovate Bot 5a38f17683 build: update angular (#41871)
PR Close #41871
2021-04-30 14:31:09 -07:00
Pete Bacon Darwin 76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 4f20cd16b4 build(docs-infra): add `assert` polyfill (#41764)
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 17ffb7480f build(docs-infra): update angular packages to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
George Kalpakas 044b380e5a build: update remark packages (#41721)
This commit updates the `remark` packages to v12 instead of the latest
(v13), because v13 is a major breaking change that requires more
investigation and work.

More specifically, v13 replaces the internals of `remark` with a new
CommonMark-compliant parser. (See their [release notes][1] for more
info.)

This change causes our old `remark` plugins (in [renderMarkdown.js][2])
to stop working.

[1]: https://github.com/remarkjs/remark/releases/tag/13.0.0
[2]: d42019d412/aio/tools/transforms/remark-package/services/renderMarkdown.js (L17-L24)

PR Close #41721
2021-04-28 09:27:23 -07:00
Pete Bacon Darwin 01d1c46b16 build(docs-infra): update dgeni-packages to fix version list (#41832)
The current version was not being computed correctly for
next and rc deployments of the angular.io website.

Fixes #41829

PR Close #41832
2021-04-27 10:15:29 -07:00
Renovate Bot 9e113f9cc4 build: update to version (#41806)
PR Close #41806
2021-04-26 12:06:48 -07:00
George Kalpakas 99f2ffc740 build: update stemmer to version 2.0.0 (#41724)
NOTE:
`stemmer` v2.0.0 switched to ES modules (see
words/stemmer@03519229c8), which means
that the only way to consume it in our CommonJS setup (for example, in
[generateKeywords][1]) is via an async `import()`.

This commit makes the `generateKeywords` processor asynchronous in order
to be able to dynamically import and use `stemmer`.

[1]: 251bec159a/aio/tools/transforms/angular-base-package/processors/generateKeywords.js

PR Close #41724
2021-04-26 11:00:59 -07:00
Renovate Bot c617f1f768 build: update jsdom to version 16.5.3 (#41695)
PR Close #41695
2021-04-19 14:16:46 -07:00
Renovate Bot 343b9d0ddc build: update jasmine-spec-reporter to version 7.0.0 (#41692)
PR Close #41692
2021-04-19 08:30:54 -07:00
Renovate Bot 0c23c8b0ac build: update image-size to version 1.0.0 (#41691)
PR Close #41691
2021-04-19 08:30:19 -07:00
Renovate Bot 5d73b33ba2 build: update angular packages (#41633)
PR Close #41633
2021-04-16 08:52:38 -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
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
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 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
Kristiyan Kostadinov 59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close #41158
2021-03-17 09:10:25 -07:00
George Kalpakas 8c939dcb40 fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183)
Before #41162, angular.io was broken on IE 11 due to missing a polyfill
for an API (`Reflect.construct()`) needed by the Custom Elements ES5
shim. #41162 tried to fix this by loading the necessary polyfill
(`es.reflect.construct.js`) on browsers that do not support ES2015
modules (including IE 11).

It turns out that the fix in #41162 was itself broken, because the
`es.reflect.consruct.js` script (included directly in the page via a
`<script>` tag) was in CommonJS format (which cannot run in the browser
as is). By chance, this still allowed browsers that supported neither
Custom Elements nor ES2015 modules (such as IE 11) to work correctly as
a side-effect of loading the `@webcomponents/custom-elements` polyfill
after the Custom Elements ES5 shim (`native-shim.js`). However, on the
few browsers that natively support Custom Elements but not ES2015
modules, angular.io would still be broken.

This commit correctly fixes angular.io on all browsers by properly
bundling the polyfills and transpiling to ES5.

Implementation-wise, we use [esbuild][1] for bundling the polyfills (and
converting from CommonJS to a browser-compatible, IIFE-based format) and
[swc][2] for downleveling the code to ES5 (since `esbuild` only supports
ES2015+).

[1]: https://esbuild.github.io/
[2]: https://swc.rs/

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 21f0deeaa6 build(docs-infra): update Angular framework, Material and CLI to latest methods (#40994)
This commit updates the Angular framework, Angular CDK/Material and
Angular CLI to latest stable versions (11.2.3, 11.2.2 and 11.2.2
respectively).

This update also fixes a Lighthouse audit fail due to
`@angular/core@11.0.0` being identified as vulnerable to XSS:
https://snyk.io/vuln/SNYK-JS-ANGULARCORE-1070902

Regarding the payload size increases, they are mostly attributed to
Angular Material:
- Before this commit:     448461 B
- After framework update: 448554 B ( +93 B)
- After Material update:  449292 B (+738 B)
- After CLI update:       449310 B ( +18 B)

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas 6e40551394 build(docs-infra): update Lighthouse to version 7.2.0 (#40994)
In this version, we no longer need our custom logic to skip certain
HTTPS related audits on localhost, since Lighthouse will treat it as a
secure context (similar to how browsers do).
See also GoogleChrome/lighthouse#11766.

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas cb16035fd3 fix(docs-infra): correctly display event dates on all timezones (#41053)
Previously, the event dates displayed on the angular.io "Events" page
(`/events`) was off by one day on timezones with a negative offset from
UTC. See
https://github.com/angular/angular/pull/41050#issuecomment-788958888.

This commit fixes it by using the `getUTC*` methods of the `Date` object
to extract the date info, which are not affected by the user's timezone.

PR Close #41053
2021-03-03 09:37:21 -08:00
Alan Agius d51d39cb4c docs: update docs to use new zone.js entry-points (#40823)
In CLI version 12, the old style of imports is no longer supported.

PR Close #40823
2021-02-24 07:58:29 -08:00
George Kalpakas a4c00c2148 build: upgrade `webdriver-manager` to v12.1.8 (#40756)
ChromeDriver now supports Apple Silicon ARM processors.
`webdriver-manager` versions 12.1.7 and earlier will, however,
incorrectly download the arm64 ChromeDriver regardless of the
system's architecture. This results in failure to run Protractor tests
on macOS with the error: `spawn Unknown system error -86`

This commit fixes the problem by upgrading `webdriver-manager` to
version 12.1.8, which includes a fix.
See also https://stackoverflow.com/questions/65618558.

PR Close #40756
2021-02-17 06:52:31 -08:00
Pete Bacon Darwin 48009dc50b build(docs-infra): do not display stack trace on doc-gen error (#40404)
This commit updates `dgeni` to the latest version, which
will now only display the stack-trace after an error if the
logger is set to `debug`.

Fixes #39610

PR Close #40404
2021-01-13 14:03:04 -08:00
George Kalpakas 9057a0cc0b build: use the latest versions of Chrome (v87) and Firefox (v84) in tests (#40150)
This commit updates the versions of Chrome and Firefox used in tests -
both with Bazel and without (via Puppeteer) - to the latest:
- Chrome v87
- Firefox v84

PR Close #40150
2020-12-21 14:15:31 -08:00
George Kalpakas 7413cb4386 build(docs-infra): update Lighthouse to v7.0.0 (#40198)
This commit updates `lighthouse` to version 7.0.0.

It also adds a `width` attribute to the `code-icon.svg` image on the
homepage, which was pointed out as missing in the Lighthouse report.
(Explicit `width`/`height` attributes on images help reduce the
[layout shift][1] of the page.)

[1]: https://web.dev/cls/

PR Close #40198
2020-12-21 10:36:02 -08:00
George Kalpakas d5fc51cc22 build(docs-infra): update `lighthouse` to 6.5.0 (#39928)
This commit updates the `lighthouse` package to version 6.5.0 to take
advantage of the latest fixes and audits.

PR Close #39928
2020-12-02 11:17:52 -08:00
Charles Lyding 318255a5f8 build: support building with TypeScript 4.1 (#39571)
TypeScript 4.1 is now used to build and test within the repository.

PR Close #39571
2020-11-25 11:10:01 -08:00
George Kalpakas b521b5eb39 build(docs-infra): update @angular/material to 11.0.0 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0.

PR Close #39600
2020-11-18 15:49:17 -08:00
George Kalpakas 882804dd01 build(docs-infra): update @angular/* to 11.0.0 and @angular/cli to 11.0.1 (#39600)
This commit updates `@angular/*` and `@angular/cli` (and related
packages) to latest 11.0.x versions (11.0.0 and 11.0.1 respectively).
(See [here][1] for a diff between a v11.0.0-rc.2 and a v11.0.1 CLI app.)

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.0.0-rc.2...11.0.1

PR Close #39600
2020-11-18 15:49:17 -08:00
George Kalpakas cfb7564dda build(docs-infra): update @angular/material to 11.0.0-rc.1 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0-rc.1.

PR Close #39600
2020-11-18 15:49:16 -08:00
George Kalpakas e3af1a874e build(docs-infra): downgrade `karma` to v5.1.1 due to regression in v5.2.0 (#39600)
This commit downgrades `karma` to version 5.1.1, because of a regression
in version 5.2.0: karma-runner/karma#3560
It has been fixed with karma-runner/karma@05dc288016 on
master, but the fix is not included in the latest release (v5.2.3).

PR Close #39600
2020-11-18 15:49:16 -08:00