Skip to content

build(docs-infra): update docs examples to latest v9#36015

Closed
gkalpak wants to merge 23 commits intoangular:masterfrom
gkalpak:build-aio-docs-examples-v9
Closed

build(docs-infra): update docs examples to latest v9#36015
gkalpak wants to merge 23 commits intoangular:masterfrom
gkalpak:build-aio-docs-examples-v9

Conversation

@gkalpak
Copy link
Copy Markdown
Member

@gkalpak gkalpak commented Mar 11, 2020

This PR cleans-up the docs examples and updates them to v9 (and also updates the code to match what the latest CLI would generate for a new project).

This was originally part of #34374 (and split off for easier reviewing).
Partly addresses: FW-1609

Fixes #34382 and #34383.

@gkalpak gkalpak added area: build & ci Related the build and CI infrastructure of the project comp: docs-infra action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed cla: yes labels Mar 11, 2020
@ngbot ngbot Bot added this to the needsTriage milestone Mar 11, 2020
@googlebot
Copy link
Copy Markdown

☹️ Sorry, but only Googlers may change the label cla: yes.

@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker and removed action: merge The PR is ready for merge by the caretaker action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 11, 2020
@gkalpak gkalpak marked this pull request as ready for review March 11, 2020 13:44
@pullapprove pullapprove Bot requested a review from mhevery March 11, 2020 13:45
@gkalpak gkalpak requested review from IgorMinar and petebacondarwin and removed request for mhevery March 11, 2020 13:46
@mary-poppins
Copy link
Copy Markdown

@mary-poppins
Copy link
Copy Markdown

@gkalpak gkalpak force-pushed the build-aio-docs-examples-v9 branch from be3cbce to c6c456b Compare March 11, 2020 18:10
@mary-poppins
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:

I assume that the reason the commits are out of order in the GH UI is because of rebases holding on to old dates... This can be remedied with git rebase master --ignore-date but not important.

  • commit 10/12 does a bit more than update the tsconfig.json - perhaps add some more explanation to the commit message?
  • commit 12/12 !fixup seems like it should be its own commit with its own message, not a fixup...

Comment thread aio/content/examples/template-expression-operators/src/app/app.component.html Outdated
Comment thread aio/tools/examples/shared/package.json Outdated
Copy link
Copy Markdown
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - global approval

but as discussed offline this is blocked until the next zone.js patch release is out.

@gkalpak
Copy link
Copy Markdown
Member Author

gkalpak commented Mar 12, 2020

@petebacondarwin

This can be remedied with git rebase master --ignore-date but not important.

Wow, thx, I didn't know --ignore-date works with regular rebase. I thought it only works with --interactive, which does not work on Windows. But without --interactive it works fine 🎉
(Updated my rebase alias 😉)

commit 10/12 does a bit more than update the tsconfig.json - perhaps add some more explanation to the commit message?
commit 12/12 !fixup seems like it should be its own commit with its own message, not a fixup...

In each commit, I make the described change (e.g. update tsconfig.json) and all changes required as a result of that to keep the tests passing. For example, updating tsconfig.json with some stricter type-checking flags made some template changes necessary. I'll update the commit messages with more info.

@gkalpak gkalpak force-pushed the build-aio-docs-examples-v9 branch from c6c456b to b6843e7 Compare March 12, 2020 20:55
@mary-poppins
Copy link
Copy Markdown

AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
….json`) (#36015)

Update `tsconfig[.*].json`.
Also, all make necessary changes to ensure the example apps can be
successfully built with the new, stricter type-checking options.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…ies) (#36015)

Update dependencies.
Also, disable AOT tests for `systemjs`-type examples in Ivy mode,
because our current setup does not work with v9. See #35989 for details.

Fixes #34382
Fixes #34383

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…` docs examples (#36015)

Previously, the `package.json` files added as boilerplate to docs
example projects of type `systemjs` were incorrect/outdated. They
contained unused dependencies and npm scripts and omitted used
dependencies.

This is not a big issue, because these examples are not offered as live
StackBlitz examples or downloadable ZIP archives, but having incorrect
`package.json` files is confusing and makes it more complicated to
update these examples.

This commit updates the `package.json` templates for the `systemjs` docs
examples and other configuration files to include used dependencies (and
remove unused ones). It also removes unused npm scripts.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…e guide (#36015)

The AOT compilation section of the `ngUpgrade` guide was
outdated/non-applicable. This commit hides the section to avoid confusion.
Fixing the section and re-introducing it is being tracked in #35989.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…ple (#36015)

This file was from back when the `testing` example was not based on the
Angular CLI and is not used any more.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
… in `setup` example (#36015)

The `unittesting` property in `example-config.json` is a remnant of the
setup (before `aio/` was moved into the `angular/angular` repo) and has
no effect any more.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
… files (#36015)

The `build` and `run` properties in `example-config.json` are only used
in example projects of type `systemjs`. In CLI-type projects, `build`
and `run` are ignored.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…ngularjs.org (#36015)

In the example apps used in the `ngUpgrade` guide, the AngularJS files
are loaded in `index.html` from `https://code.angularjs.org/`. Latest
browsers prevent loading the scripts from a page running on localhost
due to CORS:

```
Access to script at 'https://code.angularjs.org/1.5.5/angular.js' from origin
'http://localhost:9876' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'
header is present on the requested resource.
```

NOTE:
Loading the files from `code.angularjs.org` is not mentioned in the
guide, therefore it is not needed to mention this config change there.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…ebugElement.componentInstance`) (#36015)

`fixture.debugElement.componentInstance` --> `fixture.componentInstance`

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…a h1 tag`) (#36015)

Make test description less implementation specific.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
….ts`) (#36015)

Update `polyfills.ts` (`import './zone-flags.ts'` --> `import './zone-flags'`).

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…l`) (#36015)

Update `index.html` (mostly remove empty line).

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…e`, `protractor.conf.js`) (#36015)

Update configs (`.gitignore`, `protractor.conf.js`).

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
….json`) (#36015)

Update `tsconfig[.*].json`.
Also, all make necessary changes to ensure the example apps can be
successfully built with the new, stricter type-checking options.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…ies) (#36015)

Update dependencies.
Also, disable AOT tests for `systemjs`-type examples in Ivy mode,
because our current setup does not work with v9. See #35989 for details.

Fixes #34382
Fixes #34383

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…` docs examples (#36015)

Previously, the `package.json` files added as boilerplate to docs
example projects of type `systemjs` were incorrect/outdated. They
contained unused dependencies and npm scripts and omitted used
dependencies.

This is not a big issue, because these examples are not offered as live
StackBlitz examples or downloadable ZIP archives, but having incorrect
`package.json` files is confusing and makes it more complicated to
update these examples.

This commit updates the `package.json` templates for the `systemjs` docs
examples and other configuration files to include used dependencies (and
remove unused ones). It also removes unused npm scripts.

PR Close #36015
AndrewKushnir pushed a commit that referenced this pull request Mar 18, 2020
…e guide (#36015)

The AOT compilation section of the `ngUpgrade` guide was
outdated/non-applicable. This commit hides the section to avoid confusion.
Fixing the section and re-introducing it is being tracked in #35989.

PR Close #36015
@gkalpak gkalpak deleted the build-aio-docs-examples-v9 branch March 18, 2020 17:29
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Tour of Heroes completed project ZIP file for v9

5 participants