Commit Graph

531 Commits

Author SHA1 Message Date
crisbeto a3034ef92e build: bump maximum allowed yarn version (#33430)
Currently this repo allows Yarn between 1.17.3 and 1.18.0, whereas the components repo requires a minimum of 1.19.1 which makes it annoying to switch between repositories. These changes bump the maximum allowed Yarn version.

PR Close #33430
2019-10-29 11:48:18 -07:00
Igor Minar 86e1e6c082 feat: typescript 3.6 support (#32946)
BREAKING CHANGE: typescript 3.4 and 3.5 are no longer supported, please update to typescript 3.6

Fixes #32380

PR Close #32946
2019-10-18 13:15:16 -04:00
George Kalpakas ab09895810 build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33206)
Update `protractor` and ensure that the latest version of
`webdriver-manager` (v12.1.7) is installed, which correctly installs a
ChromeDriver version that is compatible with the latest version of
Chrome.

With the previous version of `webdriver-manager`, ChromeDriver v75 would
be installed by default, which was not compatible with the latest
version of Chrome (v77).

PR Close #33206
2019-10-17 14:12:29 -04:00
George Kalpakas 16fe90d6ac fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33206)
Previously, when compiling the docs examples with `ngcc` (to run them in
Ivy mode), we would only consider the `es2015` property. However, some
packages (such as `angular-in-memory-web-api`) may not have that
property in their `package.json`. They might still be compilable by
`ngcc`, if they define other format properties (such as `module` or
`main`), but `ngcc` would still fail if it could not find any of the
_specified_ properties (here only `es2015`):

```
Error: Unable to process any formats for the following entry-points (tried es2015):
  - /.../node_modules/angular-in-memory-web-api
```

This commit fixes potential issues by considering all properties that
would be considered if `ngcc` was run implicitly by `@angular/cli` and
aligns the command with the one that will be generated for new apps:
https://github.com/angular/angular/blob/3e14c2d02/packages/core/schematics/migrations/postinstall-ngcc/index.ts#L22

PR Close #33206
2019-10-17 14:12:29 -04:00
Matias Niemelä d192a7b47a revert: fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33216)
This reverts commit ccccb80fbecbe99cd913a494892f172962766f85.

PR Close #33216
2019-10-17 02:42:45 -04:00
Matias Niemelä e4504a40bd revert: build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33216)
This reverts commit b6574f24e1370238c9d6d1faa5a56fb4cb3adf79.

PR Close #33216
2019-10-17 02:42:45 -04:00
George Kalpakas e71a93afb3 build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33206)
Update `protractor` and ensure that the latest version of
`webdriver-manager` (v12.1.7) is installed, which correctly installs a
ChromeDriver version that is compatible with the latest version of
Chrome.

With the previous version of `webdriver-manager`, ChromeDriver v75 would
be installed by default, which was not compatible with the latest
version of Chrome (v77).

PR Close #33206
2019-10-16 19:02:43 -04:00
George Kalpakas 31b5db6fa8 fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33206)
Previously, we would only consider the `es2015` property, but some
packages (such as `angular-in-memory-web-api`) may not have that. They
might still be compilable by `ngcc`, is they have other format
properties (e.g. `module` or `main`).

This commit fixes potential issues by considering all properties that
would be considered via the cli integration and aligns the command to
turn on ivy for docs examples with the one used in new cli apps:
https://github.com/angular/angular/blob/3e14c2d02/packages/core/schematics/migrations/postinstall-ngcc/index.ts#L22

PR Close #33206
2019-10-16 19:02:43 -04:00
Kara Erickson 86104b82b8 refactor(core): rename ngInjectableDef to ɵprov (#33151)
Injectable defs are not considered public API, so the property
that contains them should be prefixed with Angular's marker
for "private" ('ɵ') to discourage apps from relying on def
APIs directly.

This commit adds the prefix and shortens the name from
ngInjectableDef to "prov" (for "provider", since injector defs
are known as "inj"). This is because property names cannot
be minified by Uglify without turning on property mangling
(which most apps have turned off) and are thus size-sensitive.

PR Close #33151
2019-10-16 16:36:19 -04:00
Kara Erickson cda9248b33 refactor(core): rename ngInjectorDef to ɵinj (#33151)
Injector defs are not considered public API, so the property
that contains them should be prefixed with Angular's marker
for "private" ('ɵ') to discourage apps from relying on def
APIs directly.

This commit adds the prefix and shortens the name from
ngInjectorDef to inj. This is because property names
cannot be minified by Uglify without turning on property
mangling (which most apps have turned off) and are thus
size-sensitive.

PR Close #33151
2019-10-16 16:36:19 -04:00
George Kalpakas 1a34fbce25 fix(ngcc): rename the executable from `ivy-ngcc` to `ngcc` (#33140)
Previously, the executable for the Angular Compatibility Compiler
(`ngcc`) was called `ivy-ngcc`. This would be confusing for users not
familiar with our internal terminology, especially given that we call it
`ngcc` in all our docs and presentations.

This commit renames the executable to `ngcc` and replaces `ivy-ngcc`
with a script that errors with an informative message (prompting the
user to use `ngcc` instead).

Jira issue: [FW-1624](https://angular-team.atlassian.net/browse/FW-1624)

PR Close #33140
2019-10-14 16:29:14 +00:00
George Kalpakas b2666a2857 build(docs-infra): enable more TypeScript strictness flags (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas dcd28b591d build(docs-infra): clean up and update dependencies to match latest CLI (#32980)
This commit includes the following types of changes:
- Remove unused dependencies.
- Move dev dependencies from `devDependencies` to `dependencies` (and
  vice versa for production dependencies).
- Update `@types/*`.
- Update dependencies to more closely match the dependencies installed
  by the latest CLI for new apps.

Also, ensured that the latest version of `webdriver-manager` (v12.1.7)
was installed for `protractor`, which correctly installs a ChromeDriver
version that is compatible with the latest version of Chrome.

PR Close #32980
2019-10-10 13:56:14 -07:00
Santosh Yadav 393398e6f5 build(docs-infra): update in-memory-we-api and karma-jasmine-html-reporter version (#32892)
The `karma-jasmine-html-reporter` update also includes a fix for
taras42/karma-jasmine-html-reporter#31.

Fixes #29802

PR Close #32892
2019-10-07 10:51:19 -07:00
JiaLiPassion 53d13c3fc6 refactor: rename unpatched event flag in Zone from `BLACK_LISTED_EVENTS` to `UNPATCHED_EVENTS` (#29617)
Closes #28529

PR Close #29617
2019-10-04 08:44:58 -07:00
George Kalpakas 9364a14d36 fix(docs-infra): ignore `ng*Def` members in API docs (#31378)
`ng*Def` properties (such as `ngInjectorDef`) are not considered part of
the public API and should not appear in the API docs. This commit adds a
filter to remove these properties from the docs metadata.

PR Close #31378
2019-10-03 10:24:34 -07:00
Stephen Fluin a3b6b109d8 docs: fix stackblitz example polyfills (#32969)
PR Close #32969
2019-10-02 13:20:37 -07:00
George Kalpakas 497d6b1323 ci: re-run flaky docs examples e2e tests in `test_docs_examples[_ivy]` jobs (#32497)
The docs examples e2e tests have been quite flaky recently. This causes
the `test_docs_examples` and `test_docs_examples_ivy` CircleCI jobs to
often fail (and block PRs) without a real reason.

This commit adds support for re-running failed docs examples e2e tests
and configures the `test_docs_examples` and `test_docs_examples_ivy`
jobs to try running each test that fails a second time, before giving up
and marking it as failed.

Closes #31841
Closes #31842

PR Close #32497
2019-09-05 18:10:31 -04:00
Joey Perrott 4b1251106e build: bump yarn requirement to 1.17.3 (#32344)
PR Close #32344
2019-08-28 17:13:05 -07:00
George Kalpakas 3e52e32dce build(docs-infra): add empty `codeGenApi` JSDoc tag definition (#32207)
This avoids warning such as the following ([example][1]):

```
warn: Invalid tags found -
  doc "platform-browser/ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__" (const)
  from file "platform-browser/src/browser.ts"
```

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

PR Close #32207
2019-08-28 09:41:21 -07:00
George Kalpakas 066b281979 docs(docs-infra): add note about setting up examples on Windows (#32355)
Closes #32321

PR Close #32355
2019-08-28 09:04:39 -07:00
Alex Rickabaugh ec4381dd40 feat: make the Ivy compiler the default for ngc (#32219)
This commit switches the default value of the enableIvy flag to true.
Applications that run ngc will now by default receive an Ivy build!

This does not affect the way Bazel builds in the Angular repo work, since
those are still switched based on the value of the --define=compile flag.
Additionally, projects using @angular/bazel still use View Engine builds
by default.

Since most of the Angular repo tests are still written against View Engine
(particularly because we still publish VE packages to NPM), this switch
also requires lots of `enableIvy: false` flags in tsconfigs throughout the
repo.

Congrats to the team for reaching this milestone!

PR Close #32219
2019-08-20 16:41:08 -07:00
JiaLiPassion ee486233e9 build(zone.js): update zone.js to 0.10.2 (#31975)
Bundle size changed in both zone.js(legacy) and zone-evergreen.js

- zone.js(legacy) package increased a little because the following feature and fixes.
1. #31699, handle MSPointer events PR
2. https://github.com/angular/zone.js/pull/1219 to add __zone_symbol__ customization support

- zone-evergreen.js package decreased because
1. the MSPointer PR only for legacy
2. the Object.defineProperty patch is moved to legacy #31660

PR Close #31975
2019-08-16 09:56:41 -07:00
George Kalpakas a574e462c9 build(docs-infra): ensure the locally built packages exist and are up-to-date in `yarn setup-local` (#31985)
The `setup-local` npm script uses `NgPackagesInstaller` to replace the
Angular packages with the locally built ones. Previously, it would (a)
assume that the packages were built and (b) it would do anything if the
currently installed versions already correspond to locally built
packages (even if not the latest version).
This could lead to all sorts of errors, such as:
- Confusing error messages, `dist/packages-dist/` was missing.
- Using outdated build artifacts from `dist/packages-dist/` without a
  warning.
- Not installing the latest locally built packages, because the ones
  installed already corresponded to locally built (but older) ones.

This commit fixes these issues by ensuring that:
- The local packages are always built before being used by
  `NgPackagesInstaller`.
- The local packages are installed, even if the ones install already
  correspond to local packages.

NOTE: Special `*-ci` scripts are introduced (for use on CI) that skip
      building the local packages, since that step would have been taken
      care of (in a more efficient way) in a previous CI step.

PR Close #31985
2019-08-05 12:56:44 -07:00
George Kalpakas 65cafa0eec fix(docs-infra): correctly handle multiple occurrences of an option in `NgPackagesInstaller` (#31985)
PR Close #31985
2019-08-05 12:56:43 -07:00
George Kalpakas 18aa173d39 feat(docs-infra): support building the local Angular packages in `NgPackagesInstaller` (#31985)
Previously, when `NgPackagesInstaller` needed to install the local
Angular packages to a project, it assumed the `dist/packages-dist/`
would exist and contain up-to-date built packages. I.e. it was up to the
user to have built the packages first (by running the appropriate
script).
However, many people not familiar with the `aio/` infrastructure assumed
that `yarn build-local` or `yarn build-with-ivy` would take care of all
the necessary steps.

To avoid getting confusing errors (or worse yet, using outdated local
packages), `NgPackagesInstaller` now has an option to build the packages
before using them.
One caveat is that the build script does not currently work on Windows,
so a warning is printed instead, letting the user know they need to
(somehow) take care of it themselves.

NOTE 1: Since the build script is using bazel, running it should not be
        expensive if the directory is up-to-date (i.e. no changes have
        been made to source code after the last build).
NOTE 2: This commit adds support for `--build-packages`, but does not
        change the default behavior (not building the packages). It will
        be turned on in a subsequent commit.

PR Close #31985
2019-08-05 12:56:43 -07:00
George Kalpakas bc8eb8508b refactor(docs-infra): minor refactorings and code simplification in `NgPackagesInstaller` (#31985)
PR Close #31985
2019-08-05 12:56:43 -07:00
Stefanie Fluin 382d3ed1d2 fix(docs-infra): ui polish (#31013)
- Change margin to the header so that the the label aligns with the header
- Make code in API pages pre-wrap so that you can see the actual text on the screen - helps with issue #27296
- Modified text to be title case in label API to be consistent with rest of app labels
- Removed unused table of contents SCSS file
- TOC SCSS file reorg cleanup
- Soften headers font-weight in API pages
- Make linenums ordered list inside code examples always show as numbers

PR Close #31013
2019-08-05 12:53:02 -07:00
George Kalpakas 2e84f4e0cd build(docs-infra): fix StackBlitz projects and ZIPs for `testing` guide examples (#31937)
- Update the `stackblitz.json` config files (used for generating
  Stackblitz projects and ZIP archives) to include the correct files
  (taking into account the current layout of the example projects).
- Update the boilerplate files for `testing` examples to match the
  current layout of the example projects.

PR Close #31937
2019-08-05 09:54:52 -07:00
George Kalpakas a5b12db7d6 build(docs-infra): correct list of files included in ZIPs to match current layout (#31937)
PR Close #31937
2019-08-05 09:54:52 -07:00
Adrien Crivelli 0386c964b5 build: secure yarn lock files (#31640)
See https://yarnpkg.com/blog/2019/07/12/recommended-security-update/

PR Close #31640
2019-07-29 16:10:23 -07:00
George Kalpakas 1bcd58cee8 refactor(docs-infra): remove `linenums=false` since it is now the default (#31674)
PR Close #31674
2019-07-24 14:38:54 -07:00
George Kalpakas d7ca263cc4 test(docs-infra): run tests in random order (and make them pass) (#31527)
This commit updates the necessary config files to run the angular.io and
docs tooling unit tests in random order (and fixes the tests that were
failing due to their dependence on the previous ordered execution).

Besides being a good idea anyway, running tests in random order is the
new [default behavior in jasmine@3.0.0][1], so this commit is in
preparation of upgrading jasmine to the latest version.

[1]: https://github.com/jasmine/jasmine/blob/v3.0.0/release_notes/3.0.md#breaking-changes

PR Close #31527
2019-07-18 10:17:13 -07:00
Pete Bacon Darwin 46c03bd866 build(docs-infra): never show linenums for triple-backticked code blocks (#31493)
PR Close #31493
2019-07-16 13:00:55 -04:00
Santosh Yadav 40705f3366 docs: include svg files in stackblitz and download examples (#31559)
Fixes #31537

PR Close #31559
2019-07-15 16:48:23 -04:00
Pete Bacon Darwin b65e11e3c3 build(docs-infra): display CLI positional option enum values (#31529)
Previously we on;ly displayed enum values for named options.
Now positional options get equal justice.

Fixes https://github.com/angular/angular-cli/issues/15040

PR Close #31529
2019-07-12 17:55:28 -04:00
Rudolf Olah 3246a8553c build(docs-infra): engine "yarn" versions can now be up to 1.16.0 (#31482)
PR Close #31482
2019-07-11 12:14:33 -04:00
Pete Bacon Darwin 1db3ac457c build(docs-infra): update dgeni-packages dependency (#31368)
The new version 0.27.5 now has the `post-process-html` package, so we
don't need it in angular/angular any more.

PR Close #31368
2019-07-02 11:28:23 -07:00
Brandon 2b5d52fbdc docs: add tests for lazy loading angularjs example (#30622)
PR Close #30622
2019-06-28 09:26:49 -07:00
George Kalpakas 261dc04d8e fix(docs-infra): detect docregions on more file types (`pug`, `svg`, `yml`) (#30559)
PR Close #30559
2019-06-27 15:56:26 -07:00
Kapunahele Wong 02d98ed823 docs: fix testing example (#31120)
PR Close #31120
2019-06-25 10:28:50 -07:00
Pete Bacon Darwin 3fb78aaacc feat(upgrade): provide unit test helpers for wiring up injectors (#16848)
Adds two new helper functions that can be used when unit testing Angular services
that depend upon upgraded AngularJS services, or vice versa.
The functions return a module (AngularJS or NgModule) that is configured to wire up
the Angular and AngularJS injectors without the need to actually bootstrap a full
hybrid application.

This makes it simpler and faster to unit test services.

PR Close #16848
2019-06-20 17:04:01 -07:00
George Kalpakas c34abf2cbc refactor(docs-infra): move auto-link filters to dedicated directory (#31051)
These filters have generic names (e.g. `filterPipes`), which do not make
their purpose obvious. Moving them to a dedicated `auto-link-filters`
directory should help with that.

PR Close #31051
2019-06-19 14:59:34 -07:00
George Kalpakas c6b180380a fix(docs-infra): do not auto-link `http://` to the `common/http` (#31051)
Previously, our auto-linking feature would match `http` in URLs (such as
`http://...`) to the `common/http` package and automatically create a
link to that, which was undesirable. While it is possible to work around
that via `<code class="no-auto-link">http://...</code>`, most people
didn't even realize the issue.

Since in this case it is possible to reliably know it is a false match,
this commit fixes it by applying a custom auto-link filter that ignores
all docs for `http`, if it comes before `://`.

Fixes #31012

PR Close #31051
2019-06-19 14:59:34 -07:00
Paul Gschwendtner e0969b2480 ci: update nodejs version to v10.16.0 (#31088)
Updates the NodeJS version to the latest stable version at the time of
writing (v10.16.0). We need to update our image to use a minimum NodeJS
version of v10.15.0 because new CLI apps automatically install a non-locked
version of selenium-webdriver that now requires NodeJS >= 10.15.0 since the
latest release of 17th June 2019 (4.0.0-alpha.3).

See CI failures: https://circleci.com/gh/angular/angular/359077

PR Close #31088
2019-06-17 13:07:27 -07:00
Pete Bacon Darwin 297222f892 build(docs-infra): fail hard if the CLI source is not what we expect (#30901)
Previously we just logged a warning but we should fail
to prevent silently allowing the docs to look wrong if
something changes on the CLI side of things.

PR Close #30901
2019-06-07 08:45:47 -07:00
Pete Bacon Darwin f440bd1793 build(docs-infra): fix CLI command github links (#30889)
The "view" links were broken because the version used to
compute the git tag for the GitHub URL included a build SHA.
Now we clean that off before using it in the URL.

The links are to the JSON schema that defines the documentation for
the command. This is accurate but confusing because the content for the
long description is stored in a separate markdown file referenced from this
schema file.
This commit adds a second set of links for the long description, if it exists,
which links directly to the markdown file.

Closes #30700

PR Close #30889
2019-06-06 08:49:37 -07:00
Brandon 812c231b0c docs: update example dependencies to 8.x release (#30755)
PR Close #30755
2019-06-04 11:53:55 -07:00
Michael Head 1315d23aa4 docs: increase color contrast on elements in tutorial
This increases the color contrast of elements in the tutorial (parts 1-6)
in order to meet WCAG 2.0 AA standards.
2019-05-31 15:23:32 -07:00
Santosh Yadav 876cd603f1 docs(docs-infra): remove deprecated `Buffer` usage from stackblitz builder (#30369)
Fixes #30364

PR Close #30369
2019-05-31 09:56:22 -07:00