Skip to content

test(docs-infra): ensure RxJS-related docs examples can compile without errors#34063

Closed
sonukapoor wants to merge 2 commits intoangular:masterfrom
sonukapoor:compilation-validation-for-rxjs-examples
Closed

test(docs-infra): ensure RxJS-related docs examples can compile without errors#34063
sonukapoor wants to merge 2 commits intoangular:masterfrom
sonukapoor:compilation-validation-for-rxjs-examples

Conversation

@sonukapoor
Copy link
Copy Markdown
Contributor

@sonukapoor sonukapoor commented Nov 26, 2019

Some examples are simple typescript files. The changes in this PR make sure that they compile.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #28017

What is the new behavior?

There is currently no way to validate code that is not an angular application e.g: The RxJS guide has no tests and no compilation steps. This PR adds a compilation step to at least validate the files.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@sonukapoor sonukapoor requested a review from a team November 26, 2019 19:26
@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@sonukapoor
Copy link
Copy Markdown
Contributor Author

@googlebot I fixed it.

@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch from c8d87ba to 091109b Compare November 26, 2019 19:46
@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch 2 times, most recently from 70478f4 to 62032a9 Compare November 26, 2019 20:32
@sonukapoor sonukapoor requested a review from a team November 26, 2019 20:32
@gkalpak gkalpak added comp: docs-infra state: WIP target: patch This PR is targeted for the next patch release labels Nov 26, 2019
@ngbot ngbot Bot modified the milestone: needsTriage Nov 26, 2019
Copy link
Copy Markdown
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Thx, @sonukapoor! This is looking great already. I left a couple of comments.
Also, can you please update the commit message to something like:

test(docs-infra): ensure RxJS-related docs examples can compile without errors

Previously, some RxJS-related examples (which are not proper Angular apps) were not
tested on CI as part of the example-e2e npm script. This meant that the examples
could get out-of-date or contain compile errors without as noticing.

This commit ensures that the example-e2e script picks up these examples and checks
that they compile successfully.

Partly addresses #28017.

This should not close #28017, because that one is about adding tests (which this PR does not do).

Comment thread aio/content/examples/observables-in-angular/example-config.json Outdated
Comment thread aio/content/examples/observables-in-angular/src/main.ts Outdated
Comment thread aio/content/examples/observables-in-angular/example-config.json Outdated
Comment thread aio/package.json Outdated
Comment thread aio/content/examples/practical-observable-usage/src/typeahead.ts Outdated
@sonukapoor
Copy link
Copy Markdown
Contributor Author

@gkalpak All changes done, except the package.json one. Please suggest what should be done on that part.

Comment thread aio/content/examples/observables/example-config.json Outdated
Comment thread aio/package.json Outdated
@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch 3 times, most recently from 4a1da68 to 1a655a0 Compare November 28, 2019 17:39
@sonukapoor
Copy link
Copy Markdown
Contributor Author

@gkalpak I have reverted the @types/node in root and add it to the shared package.json file. I also had to upgrade @types/jquery to 3.3.28. Please review.

Copy link
Copy Markdown
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Great job, @sonukapoor 👏
Can you also please squash all commits together (and keep the commit message from a610a01be)?

Comment thread aio/yarn.lock Outdated
@gkalpak gkalpak added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed state: WIP labels Nov 28, 2019
@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch 3 times, most recently from 5bfbf4c to 223ad81 Compare November 28, 2019 19:33
@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch from 223ad81 to 1b8cf27 Compare November 28, 2019 19:41
…ut errors

Previously, some RxJS-related examples (which are not proper Angular apps) were not
tested on CI as part of the `example-e2e` npm script. This meant that the examples
could get out-of-date or contain compile errors without as noticing.

This commit ensures that the `example-e2e` script picks up these examples and checks
that they compile successfully.

Partly addresses angular#28017.
@sonukapoor sonukapoor force-pushed the compilation-validation-for-rxjs-examples branch from 1b8cf27 to a4fe600 Compare November 28, 2019 19:43
@googlebot
Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@gkalpak
Copy link
Copy Markdown
Member

gkalpak commented Nov 28, 2019

@googlebot I consent.

@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Nov 28, 2019
@gkalpak
Copy link
Copy Markdown
Member

gkalpak commented Nov 28, 2019

merge-assistance: Global approval for this docs(-infra)-only change.

mhevery pushed a commit that referenced this pull request Dec 2, 2019
…ut errors (#34063)

Previously, some RxJS-related examples (which are not proper Angular apps) were not
tested on CI as part of the `example-e2e` npm script. This meant that the examples
could get out-of-date or contain compile errors without as noticing.

This commit ensures that the `example-e2e` script picks up these examples and checks
that they compile successfully.

Partly addresses #28017.

PR Close #34063
@mhevery mhevery closed this in 2cc954d Dec 2, 2019
@gkalpak gkalpak changed the title docs: adds config to compile non-angular files test(docs-infra): ensure RxJS-related docs examples can compile without errors Dec 2, 2019
@sonukapoor sonukapoor deleted the compilation-validation-for-rxjs-examples branch December 3, 2019 20:08
@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 Jan 3, 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 cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants