Commit Graph

469 Commits

Author SHA1 Message Date
George Kalpakas 282167a37f build(docs-infra): upgrade tslint to 5.15.0 and codelyzer to 5.0.0 (#29926)
This commit also changes the `tslint.json` config file to (reasonably
closely) match what the cli would generate for a new app.

PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas eb85c8a742 build(docs-infra): make type-checking stricter by enabling `noImplicitAny` (#29926)
PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas 6c1ae294dc build(docs-infra): upgrade @angular/cli to 8.0.0-beta.18 (#29926)
This commit also changes the config files and their layout to
(reasonably closely) match what the cli would generate for a new app.

Related Jira issue: [TOOL-815](https://angular-team.atlassian.net/browse/TOOL-815)

PR Close #29926
2019-04-25 12:32:49 -07:00
Dustin M. Eastway 00ea3983e3 docs(docs-infra): fix typo in the aio/tools/examples/README (#30041)
Remove an 'a' that was accidentally repeated twice in the aio/tools/examples/README.md file.

PR Close #30041
2019-04-24 11:33:23 -07:00
George Kalpakas e8d3246c6e build(docs-infra): upgrade RxJS in docs examples to 6.5.1 (#30048)
Related to #30043.

PR Close #30048
2019-04-24 10:41:37 -07:00
Filipe Silva ac3dc3cfc6 test(docs-infra): ignore lazy loading examples in Ivy (#28685)
PR Close #28685
2019-04-12 11:26:24 -07:00
Alex Rickabaugh b0578061ce refactor(ivy): use ɵɵ instead of Δ for now (#29850)
The `Δ` caused issue with other infrastructure, and we are temporarily
changing it to `ɵɵ`.

This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`.

PR Close #29850
2019-04-11 16:27:56 -07:00
Ben Lesh 138ca5a246 refactor(ivy): prefix all generated instructions (#29692)
- Updates all instructions to be prefixed with the Greek delta symbol

PR Close #29692
2019-04-10 12:11:40 -07:00
George Kalpakas 8bbf481d60 refactor(docs-infra): rename properties (blacklisted --> ignored) (#29754)
PR Close #29754
2019-04-08 09:46:34 -07:00
George Kalpakas c5bba8d9f2 build(docs-infra): do not include `announcements.json` in sitemap (#29754)
The `announcements.json` file should not be included in the sitemap and
including it causes an error in Google Search Console (because the
generated URL does not exist).

(This is a follow-up to fbef94a8e.)

PR Close #29754
2019-04-08 09:46:33 -07:00
Pete Bacon Darwin 433b7b02a4 test(docs-infra): fix eslint warnings (#29673)
```
warning  An "it" that uses an async method should handle failure (use "done.fail")  jasmine/no-promise-without-done-fail
```

PR Close #29673
2019-04-04 10:52:36 -07:00
Pete Bacon Darwin a4f3f3f81d build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673)
Now, one can add an `@alias` tag to API docs, which tells dgeni that this
API element (usually a `const`) is really just an alias for some API element
defined elsewhere.

Dgeni will then look up this API element and copy over the properties from
the alias to the current doc.

For example, we would like to privately export an Enum from `@angular/core`
but then publicly export this from `@angular/common`:

**packages/core/private_exports.ts**

```ts
/**
 * Description of this document.
 */
export enum ɵSomeEnum { ... }
```

**packages/common/public_api.ts**

```ts
import {ɵSomeEnum} from '@angular/core';

 /**
 * @alias core/ɵSomeEnum
 */
export const SomeEnum = ɵSomeEnum;
```

In the generated docs there will be a page for `common/SomeEnum`, which
will be rendered as an enum, rather than a const, showing the description
extracted from the `core/ɵSomeEnum`.

---

The implementation of this feature required some refactoring of the other
processing:

1. Previously `ɵ` prefixed exports were not even considered.
2. Due to 1. some processors needed to have guards added to ignore such
   private exports (`addMetadataAliases` and `checkContentRules`).
3. The processing of package pages had to be reworked (and split) so that
   it picked up the aliased export docs after their alias proeprties had
   been copied.

See FW-1207, FW-632, #29249

PR Close #29673
2019-04-04 10:52:36 -07:00
Pete Bacon Darwin 6233cd55f7 style(docs-infra): fix typo (#29673)
PR Close #29673
2019-04-04 10:52:36 -07:00
Alex Eagle 03d914a6c2 build: hide @angular/http for Angular v8 (#29550)
Currently our plan is to skip the publish, docgen, and update steps for this package.
During RC, we'll determine if the breaking change is too difficult for users, in which case we might restore the package for another major.

PR Close #29550
2019-04-02 10:55:31 -07:00
George Kalpakas b2c03b8cd4 build(docs-infra): remove unused `PhantomJS` dependency (#29611)
PhantomJS is [not being developed any more][1] and with modern
alternatives (such as Chrome headless) there is no reason to keep it as
a dependency.

[1]: https://github.com/ariya/phantomjs/issues/15344

PR Close #29611
2019-04-01 10:57:30 -07:00
Brandon 12c9bd257d docs: add new getting started guide (#27684)
PR Close #27684
2019-03-29 10:47:37 -07:00
JiaLiPassion 17f7bdbd60 build: update zone.js to 0.9.0 (#28219)
The API changes are due to enabling strict checks in TypeScript (via `strict: true`).
The payload size changes in `polyfills.js` are due to more browser APIs being patched in recent versions (e.g. `fetch`, `customElement v1`).

PR Close #28219
2019-03-26 12:50:38 -07:00
Pete Bacon Darwin bdcbd9ed4b fix(ivy): ngcc - teach Esm5ReflectionHost about aliased variables (#29092)
Sometimes, in ESM5 code, aliases to exported variables are used internally
to refer to the exported value. This prevented some analysis from being
able to match up a reference to an export to the actual export itself.

For example in the following code:

```
var HttpClientXsrfModule = /** @class */ (function () {
  function HttpClientXsrfModule() {
  }
  HttpClientXsrfModule_1 = HttpClientXsrfModule;
  HttpClientXsrfModule.withOptions = function (options) {
      if (options === void 0) { options = {}; }
      return {
          ngModule: HttpClientXsrfModule_1,
          providers: [],
      };
  };
  var HttpClientXsrfModule_1;
  HttpClientXsrfModule = HttpClientXsrfModule_1 = tslib_1.__decorate([
      NgModule({
          providers: [],
      })
  ], HttpClientXsrfModule);
  return HttpClientXsrfModule;
}());
```

We were not able to tell that the `ngModule: HttpClientXsrfModule_1` property
assignment was actually meant to refer to the `function HttpClientXrsfModule()`
declaration.  This caused the `ModuleWithProviders` processing to fail.

This commit ensures that we can compile typings files using the ESM5
format, so we can now update the examples boilerplate tool so that it
does not need to compile the ESM2015 format at all.

PR Close #29092
2019-03-20 14:45:55 -04:00
Pete Bacon Darwin 7b55ba58b9 refactor(ivy): ngcc - remove flat-format and use AbsoluteFsPath (#29092)
Now that we are using package.json properties to indicate which
entry-point format to compile, it turns out that we don't really
need to distinguish between flat and non-flat formats, unless we
are compiling `@angular/core`.

PR Close #29092
2019-03-20 14:45:54 -04:00
Pete Bacon Darwin cd449021c1 feat(ivy): ngcc - compile only specified package.json format properties (#29092)
You can now specify a list of properties in the package.json that
should be considered (in order) to find the path to the format to compile.

The build marker system has been updated to store the markers in
the package.json rather than an additional external file.
Also instead of tracking the underlying bundle format that was compiled,
it now tracks the package.json property.

BREAKING CHANGE:

The `proertiesToConsider` option replaces the previous `formats` option,
which specified the final bundle format, rather than the property in the
package.json.
If you were using this option to compile only specific bundle formats,
you must now modify your usage to pass in the properties in the package.json
that map to the format that you wish to compile.

In the CLI, the `--formats` is no longer available. Instead use the
`--properties` option.

FW-1120

PR Close #29092
2019-03-20 14:45:54 -04:00
Judy Bogart bc99b774ba docs: add schematics guide (#28343)
PR Close #28343
2019-03-19 15:47:14 -04:00
Greg Magolan e76cf8c775 build: fix aio test (#29210)
PR Close #29210
2019-03-14 11:38:12 -04:00
Paul Gschwendtner ec8b74da56 ci(docs-infra): re-enable systemjs JIT docs examples (#29083)
With 63fb6c08cf1d69f912a0a4e9a28846d6e6985d04, the bug that required
us to temporarily disable these two SystemJS JIT tests has been fixed.

Therefore we can re-enable these tests.

PR Close #29083
2019-03-12 11:50:06 -07:00
Paul Gschwendtner e20a29a153 build(docs-infra): support running cli docs examples concurrently (#29103)
PR Close #29103
2019-03-12 10:46:03 -07:00
Adam Plumer 6b6fdffc12 fixup! docs: update Universal guide (#28296)
PR Close #28296
2019-03-11 10:52:18 -07:00
Adam Plumer a29ce57732 docs: migrate examples from @angular/http to @angular/common/http (#28296)
PR Close #28296
2019-03-11 10:52:17 -07:00
Paul Gschwendtner 1d4dde2adc ci(docs-infra): disable failing ivy jit systemjs examples (#28984)
As a side effect of 09b34bae8655d4251516655c317b150c46cd3653,
we fixed that the docs systemjs examples currently do not run
with Ivy in JIT mode. This now uncovered new failures with the JIT
resource loading. e.g.

```
zone.js:665 Unhandled Promise rejection: Component 'PhoneListComponent' is not resolved:
 - templateUrl: ./phone-list.template.html
Did you run and wait for 'resolveComponentResources()'? ; Zone: <root> ; Task: Promise.then ; Value: Error: Component 'PhoneListComponent' is not resolved:
 - templateUrl: ./phone-list.template.html
Did you run and wait for 'resolveComponentResources()'?
    at Function.get (directive.ts:54)
    at getComponentDef (definition.ts:648)
    at verifyDeclarationsHaveDefinitions (module.ts:185)
    at Array.forEach (<anonymous>)
    at verifySemanticsOfNgModuleDef (module.ts:159)
    at Function.get (module.ts:132)
    at getInjectorDef (defs.ts:181)
    at R3Injector.processInjectorType (r3_injector.ts:230)
    at eval (r3_injector.ts:114)
    at eval (r3_injector.ts:451) Error: Component 'PhoneListComponent' is not resolved:
```

We temporarily disable these two failing SystemJS examples by adding them to the
`fixmeIvyExamples` list.

PR Close #28984
2019-02-28 10:46:12 -08:00
Paul Gschwendtner 5874247494 build(docs-infra): examples should not run ngcc for all formats (#28984)
Currently when adding the example boilerplate to all
examples with Ivy enabled, we run Ngcc and transform
all found formats. This potentially slows down the build and
is not necessary as we only need the "fesm5" and "fesm2015" bundles.

PR Close #28984
2019-02-28 10:46:12 -08:00
Alex Rickabaugh 827e89cfc4 feat(ivy): support inline <style> and <link> tags in components (#28997)
Angular supports using <style> and <link> tags inline in component
templates, but previously such tags were not implemented within the ngtsc
compiler. This commit introduces that support.

FW-1069 #resolve

PR Close #28997
2019-02-27 11:56:40 -08:00
Marc Laval 3c7ce823a3 test(ivy): add root cause for failing component-styles docs e2e tests (#28760)
PR Close #28760
2019-02-16 21:00:08 -08:00
Marc Laval 1e6ed52cba fix(docs-infra): all examples should get Ivy boilerplate (#28757)
PR Close #28757
2019-02-16 20:59:16 -08:00
Marc Laval 3842dd6a6d fix(ivy): OnChanges should support updating one Input among many (#28693)
PR Close #28693
2019-02-13 19:15:44 -08:00
Kapunahele Wong 5cafd44654 fix(docs-infra): fix filtering in run-example-e2e.js (#28663)
PR Close #28663
2019-02-13 12:04:51 -08:00
Marc Laval f8b9e61469 test(ivy): enable more docs examples e2e tests (#28688)
PR Close #28688
2019-02-13 09:53:13 -08:00
Brandon 1e64f37257 fix(docs-infra): add progression files to exclude list for docs examples (#28650)
Also disables Http guide under Ivy tests with documented error

PR Close #28650
2019-02-11 13:26:39 -08:00
Brandon 99e3a04ea2 ci(docs-infra): test docs examples with Ivy (#28463)
PR Close #28463
2019-02-11 17:16:52 +00:00
Brandon 0a95f8af9f docs: add more files to be ignored during app compilation (#28592)
PR Close #28592
2019-02-11 17:09:25 +00:00
Brandon d29f781685 docs: ignore progression filenames from compilation (#28592)
PR Close #28592
2019-02-11 17:09:24 +00:00
Brandon 425e0ee416 ci(docs-infra): run docs examples tests in production mode (#28592)
PR Close #28592
2019-02-11 17:09:23 +00:00
George Kalpakas 3de06dd794 build(docs-infra): use pinned dependencies when possible in `ng-packages-installer` (#28510)
Previously, `ng-packages-installer` would replace the version ranges for
all dependencies that were peer dependencies of an Angular package with
the version range used in the Angular package. This effectively meant
that the pinned version (from `yarn.lock`) for that dependency was
ignored (even if the pinned version satisfied the new version range).

This commit reduces non-determinism in CI jobs using the locally built
Angular packages by always using pinned versions of dependencies for
Angular package peer dependencies if possible.

For example, assuming the following versions for the RxJS dependency:

- **aio/package.json**: `rxjs: ^6.3.0`
- **aio/yarn.lock**: `rxjs@^6.3.0: 6.3.3`
- **@angular/core#peerDependencies**: `rxjs: ^6.0.0`

...the following versions would be used with `ng-packages-installer`:

- Before this commit:
  - **aio/package.json**: `rxjs: ^6.0.0`
  - **node_modules/rxjs/**: `6.4.0` (latest version satisfying `^6.0.0`)
- After this commit:
  - **aio/package.json**: `rxjs: ^6.3.0`
  - **node_modules/rxjs/**: `6.3.3` (because it satisfies `^6.0.0`)

PR Close #28510
2019-02-06 21:23:02 -08:00
George Kalpakas 9ce0c23c77 build(docs-infra): keep other dependencies pinned when installing local Angular packages (#28510)
`ng-packages-installer` can be used to replace Angular packages with
locally built ones (from `dist/packages-dist/`) along with their peer
dependencies.

Previously, in order to achieve this, `yarn install` was called with the
`--no-lockfile` option, which resulted in installing the latest versions
of all dependencies (including transitive ones) permitted by the
corresponding version ranges in `package.json` files. As a result, newly
released versions would be picked, resulting in unexpected,
non-deterministic breakages in CI.

This commit calls `yarn install` with the `--pure-lockfile` option
instead. As a result, only the Angular packages (for which the locally
built ones are used) and their peer dependencies are unpinned; the
pinned versions from `yarn.lock` are used for all other (direct and
transitive) dependencies.

While this does not eliminate non-determinism across builds, it
significantly reduces it.

PR Close #28510
2019-02-06 21:23:02 -08:00
George Kalpakas 08f55b35a5 perf(docs-infra): avoid unnecessary I/O operation in `ng-packages-installer` (#28510)
PR Close #28510
2019-02-06 21:23:02 -08:00
George Kalpakas 2b9811dad4 refactor(docs-infra): format `package.json` for readability in `ng-packages-installer` (#28510)
PR Close #28510
2019-02-06 21:23:02 -08:00
George Kalpakas df74da02c6 build(docs-infra): remove unnecessary workaround for RxJS in `ng-packages-installer` (#28510)
Since b43f8bc7d, RxJS does not need to be patched any more in the
top-level `node_modules/`, so we don't need to special-case RxJS in
`ng-package-installer` and use `node_modules/rxjs/`.

PR Close #28510
2019-02-06 21:23:02 -08:00
George Kalpakas 72c36956de ci: pin ChromeDriver to a version compatible with docker image's Chrome (#28494)
By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: bfd48d156d/.circleci/config.yml (L16)
[2]: bfd48d156d/tools/ngcontainer/Dockerfile (L63)

PR Close #28494
2019-02-01 20:22:03 -05:00
jithil-kore ec414b432e perf: yarn version upgrade (#28360)
PR Close #28360
2019-01-29 11:58:47 -08:00
Alan Agius d940b5541f fix(docs-infra): boolean options default value is incorrect when it's undefined (#27024)
In the CLI when it's undefined it can mean `false`, or sometimes it will be overwritten by a runtime value.

PR Close #27024
2019-01-28 20:43:15 -08:00
WilliamKoza e2c98fbe11 fix(docs-infra): change the key used to find out the cli section (#28293)
PR Close #28293
2019-01-24 15:41:44 -08:00
WilliamKoza 4c0104c846 fix(docs-infra): Add crossed through styling (#28111)
PR Close #28111
2019-01-14 10:45:46 -08:00
WilliamKoza 72f2428cd8 fix(docs-infra): change style of `deprecated` markers (#28111)
PR Close #28111
2019-01-14 10:45:46 -08:00