Files
flipper/flipper-js-client-sdk
dependabot[bot] f5dab2a3a1 Bump eslint from 7.16.0 to 7.17.0 in /flipper-js-client-sdk (#1805)
Summary:
Bumps [eslint](https://github.com/eslint/eslint) from 7.16.0 to 7.17.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/releases">eslint's releases</a>.</em></p>
<blockquote>
<h2>v7.17.0</h2>
<ul>
<li><a href="e128e775e9"><code>e128e77</code></a> Update: check logical assignment in no-constant-condition (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13946">#13946</a>) (Milos Djermanovic)</li>
<li><a href="cc48713696"><code>cc48713</code></a> Chore: refactor calculating range and loc in no-useless-escape (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13964">#13964</a>) (Milos Djermanovic)</li>
<li><a href="535fe47fee"><code>535fe47</code></a> Update: use regexpp's default ecmaVersion in no-control-regex (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13969">#13969</a>) (Milos Djermanovic)</li>
<li><a href="83e98cd48c"><code>83e98cd</code></a> Fix: use regexpp's default ecmaVersion in no-invalid-regexp (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13968">#13968</a>) (Milos Djermanovic)</li>
<li><a href="7297363ea3"><code>7297363</code></a> Docs: fix examples for no-multi-str (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13966">#13966</a>) (Milos Djermanovic)</li>
<li><a href="06498716bf"><code>0649871</code></a> Update: add autofix to rule multiline-ternary (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13958">#13958</a>) (薛定谔的猫)</li>
<li><a href="f6e7e3231b"><code>f6e7e32</code></a> Fix: no-useless-escape wrong loc and fix with CRLF in template elements (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13953">#13953</a>) (Milos Djermanovic)</li>
<li><a href="19c69c0293"><code>19c69c0</code></a> Fix: one-var shouldn't split declaration if it isn't in a statement list (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13959">#13959</a>) (Milos Djermanovic)</li>
<li><a href="e451b9664a"><code>e451b96</code></a> Docs: update build tool for webpack (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13962">#13962</a>) (Sam Chen)</li>
<li><a href="c3e9accce2"><code>c3e9acc</code></a> Chore: fix typos (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13960">#13960</a>) (YeonJuan)</li>
<li><a href="7289ecf58e"><code>7289ecf</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/blob/master/CHANGELOG.md">eslint's changelog</a>.</em></p>
<blockquote>
<p>v7.17.0 - January 1, 2021</p>
<ul>
<li><a href="e128e775e9"><code>e128e77</code></a> Update: check logical assignment in no-constant-condition (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13946">#13946</a>) (Milos Djermanovic)</li>
<li><a href="cc48713696"><code>cc48713</code></a> Chore: refactor calculating range and loc in no-useless-escape (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13964">#13964</a>) (Milos Djermanovic)</li>
<li><a href="535fe47fee"><code>535fe47</code></a> Update: use regexpp's default ecmaVersion in no-control-regex (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13969">#13969</a>) (Milos Djermanovic)</li>
<li><a href="83e98cd48c"><code>83e98cd</code></a> Fix: use regexpp's default ecmaVersion in no-invalid-regexp (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13968">#13968</a>) (Milos Djermanovic)</li>
<li><a href="7297363ea3"><code>7297363</code></a> Docs: fix examples for no-multi-str (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13966">#13966</a>) (Milos Djermanovic)</li>
<li><a href="06498716bf"><code>0649871</code></a> Update: add autofix to rule multiline-ternary (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13958">#13958</a>) (薛定谔的猫)</li>
<li><a href="f6e7e3231b"><code>f6e7e32</code></a> Fix: no-useless-escape wrong loc and fix with CRLF in template elements (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13953">#13953</a>) (Milos Djermanovic)</li>
<li><a href="19c69c0293"><code>19c69c0</code></a> Fix: one-var shouldn't split declaration if it isn't in a statement list (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13959">#13959</a>) (Milos Djermanovic)</li>
<li><a href="e451b9664a"><code>e451b96</code></a> Docs: update build tool for webpack (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13962">#13962</a>) (Sam Chen)</li>
<li><a href="c3e9accce2"><code>c3e9acc</code></a> Chore: fix typos (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13960">#13960</a>) (YeonJuan)</li>
<li><a href="7289ecf58e"><code>7289ecf</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="896273f9d7"><code>896273f</code></a> 7.17.0</li>
<li><a href="be40eff57f"><code>be40eff</code></a> Build: changelog update for 7.17.0</li>
<li><a href="e128e775e9"><code>e128e77</code></a> Update: check logical assignment in no-constant-condition (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13946">#13946</a>)</li>
<li><a href="cc48713696"><code>cc48713</code></a> Chore: refactor calculating range and loc in no-useless-escape (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13964">#13964</a>)</li>
<li><a href="535fe47fee"><code>535fe47</code></a> Update: use regexpp's default ecmaVersion in no-control-regex (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13969">#13969</a>)</li>
<li><a href="83e98cd48c"><code>83e98cd</code></a> Fix: use regexpp's default ecmaVersion in no-invalid-regexp (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13968">#13968</a>)</li>
<li><a href="7297363ea3"><code>7297363</code></a> Docs: fix examples for no-multi-str (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13966">#13966</a>)</li>
<li><a href="06498716bf"><code>0649871</code></a> Update: add autofix to rule multiline-ternary (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13958">#13958</a>)</li>
<li><a href="f6e7e3231b"><code>f6e7e32</code></a> Fix: no-useless-escape wrong loc and fix with CRLF in template elements (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13953">#13953</a>)</li>
<li><a href="19c69c0293"><code>19c69c0</code></a> Fix: one-var shouldn't split declaration if it isn't in a statement list (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13">https://github.com/facebook/flipper/issues/13</a>...</li>
<li>Additional commits viewable in <a href="https://github.com/eslint/eslint/compare/v7.16.0...v7.17.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=7.16.0&new-version=7.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/1805

Reviewed By: cekkaewnumchai

Differential Revision: D25804200

Pulled By: passy

fbshipit-source-id: 1c152a70e5e30753377d87045a5dcd6937bee5ed
2021-01-07 04:23:14 -08:00
..
2020-11-09 08:24:28 -08:00
2020-06-11 08:45:35 -07:00
2020-06-11 08:45:35 -07:00

flipper-sdk-api

SDK to build Flipper clients for JS based apps

Installation

yarn add flipper-client-sdk

Usage

Example

class SeaMammalPlugin extends AbsctractFlipperPlugin {
  getId(): string {
    return 'sea-mammals';
  }

  runInBackground(): boolean {
    return true;
  }

  newRow(row: {id: string, url: string, title: string}) {
    this.connection?.send("newRow", row)
  }
}

const flipperClient = newWebviewClient();
cosnt plugin = new SeaMammalPlugin();
flipperClient.addPlugin();
flipperClient.start('Example JS App');
plugin.newRow({id: '1', title: 'Dolphin', url: 'example.com'})