Commit Graph

36 Commits

Author SHA1 Message Date
Michel Weststrate
8b2d8498e6 Upgrade to TypeScript 3.9
Summary:
Upgrading to TypeScript 3.9 so that we can use `// ts-expect-error`, that allows us to basically write unit tests for typings.

Fixed the typescript path in `settings.json`, because otherwise VSCode kept picking the built-in version (3.8.3 atm) of ts when opening the `sonar` folder as workspace.

Reviewed By: passy

Differential Revision: D22255818

fbshipit-source-id: ae54aedb237445f32f1797b4290656dbfb0e528f
2020-07-01 09:12:36 -07:00
generatedunixname89002005306973
8000090eac Flipper Release: v0.49.0
Summary: Releasing version 0.49.0

Reviewed By: cekkaewnumchai

Differential Revision: D22307632

fbshipit-source-id: 105fc71f07a4827a5d6e54cf3200b22f800a5f1e
2020-06-30 06:33:04 -07:00
Anton Nikolaev
419691da97 Added command "flipper-pkg checksum"
Summary: Changelog: Added command `flipper-pkg checksum` for computing the total checksum of all the files included into plugin package.

Reviewed By: passy

Differential Revision: D22255125

fbshipit-source-id: a4f91370b4ab16ea4ce4a60e29f9d20fdd5f4331
2020-06-26 03:25:27 -07:00
Pascal Hartig
011952d73c Flipper Release: v0.48.0
Summary: Releasing version 0.48.0

Reviewed By: mweststrate

Differential Revision: D22207960

fbshipit-source-id: 7f21ff151c4e5750646a6dd3e39690229a2e73a5
2020-06-25 02:32:47 -07:00
Pascal Hartig
f088d7ceec Update jest
Summary: Getting some warnings from ts-jest being potentially incompatible.

Reviewed By: nikoant

Differential Revision: D22184492

fbshipit-source-id: b0ff36bd63f45ca71957f882a08dcbedfdd5de87
2020-06-24 05:34:23 -07:00
Anton Nikolaev
e545a50045 Rolled back removing inline source map for plugins build
Summary: After some testing I found file source map does not work as expected when prod version of Flipper is used to debug plugin. So returning back inline source maps. Note that this only affects debug builds, for production builds no source maps will be produced anyway.

Reviewed By: passy

Differential Revision: D22161927

fbshipit-source-id: 068b9da09da4dcb6c31aff4e5a15bd6438f686b3
2020-06-23 03:55:41 -07:00
Anton Nikolaev
f436f192eb Fix getWatchFolder script to resolve workspaces transitive dependencies (#1289)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1289

getWatchFolder script updated to resolve symlinked transitive dependencies. Before this change the script only resolved 1st direct symlinked dependencies.

Reviewed By: mweststrate

Differential Revision: D22161469

fbshipit-source-id: c30802a413259021aaca99c08743dc762ed877eb
2020-06-23 03:55:41 -07:00
Anton Nikolaev
b69996ca50 Remove inlined source maps from debug builds
Summary: Disabled producing inline source maps for debug builds. Source maps are already writte to "map" files, so this does not make sense to also inline them to the js bundle. Passing "sourceMapUrl" parameter to Metro fixed this.

Reviewed By: mweststrate

Differential Revision: D22159501

fbshipit-source-id: f06225cd43f44a7f93afcc32bb0501323b35d0c3
2020-06-22 06:11:29 -07:00
Anton Nikolaev
c359d666c5 Use default Metro implementation of source module ID mappings for "flipper-pkg bundle"
Summary: Use default Metro implementation of source module ID mappings for "flipper-pkg bundle". The problem with the custom implementation we used before is that it is not deterministic, i.e. produced bundles are different on different machines. We need deterministic bundles to reliably detect if the version changed from the last deployment to Marketplace.

Reviewed By: mweststrate

Differential Revision: D22158794

fbshipit-source-id: ae4b4b05e020489c0900423107a938a5b670e7d8
2020-06-22 02:40:59 -07:00
Anton Nikolaev
21ab8dc25c "flipper-pkg" option for creating production bundle
Summary:
Development bundle: NODE_ENV=development, disabled minification, enabled source maps.

Production bundle: NODE_ENV=production, enabled minification, disabled source maps.

Changelog: Added "--production" option for "flipper-pkg bundle" command to produce minified plugin packages without source maps.

Reviewed By: mweststrate

Differential Revision: D22158791

fbshipit-source-id: 0f9ac84ca39ac3fb86f0c0b0a3c1be866445a305
2020-06-22 02:40:59 -07:00
generatedunixname89002005306973
43b9426ff4 Flipper Release: v0.47.0
Summary: Releasing version 0.47.0

Reviewed By: jknoxville

Differential Revision: D22089288

fbshipit-source-id: 0107d1f17cce8c9adc2b9c26d48a6d80797749be
2020-06-17 09:00:07 -07:00
generatedunixname89002005306973
c0eb2648b7 Flipper Release: v0.46.0
Summary: Releasing version 0.46.0

Reviewed By: nikoant

Differential Revision: D21952711

fbshipit-source-id: 8681a244d64c50f2ad50f6c9c5e0ea766fd9ff20
2020-06-09 10:14:19 -07:00
Anton Nikolaev
ecfdeb2276 Make external typings re-usable across all the workspaces
Summary: Our external typings were only effective for the main "app" package. In this diff I've made them effective for all other workspaces too, and also cleaned up typescript configs.

Reviewed By: passy

Differential Revision: D21927361

fbshipit-source-id: ceb8009255583d969d79cc11b20dfe8b686f2fb3
2020-06-08 08:57:06 -07:00
Anton Nikolaev
339b786fb5 Added new package "flipper-plugin-lib" which contains re-usable code related to plugin installation
Summary: No functional changes, just refactoring for easier implementation of plugin updates installation

Reviewed By: passy

Differential Revision: D21902525

fbshipit-source-id: fbfa221a89b879b0d08127676b27df65ef63307d
2020-06-05 06:16:19 -07:00
generatedunixname89002005306973
23d80bf3d5 Flipper Release: v0.45.0
Summary: Releasing version 0.45.0

Reviewed By: mweststrate

Differential Revision: D21860035

fbshipit-source-id: 58af5bbc4e743024beac925eac8012e64bd76aa9
2020-06-03 08:28:54 -07:00
generatedunixname89002005306973
b18760823d Flipper Release: v0.44.1
Summary: Releasing version 0.44.1

Reviewed By: passy

Differential Revision: D21767292

fbshipit-source-id: 94276959d0421fa687cc24f9553a0951b398ea56
2020-05-29 05:02:23 -07:00
generatedunixname89002005306973
b538cead7a Flipper Release: v0.44.0
Summary: Releasing version 0.44.0

Reviewed By: passy

Differential Revision: D21686080

fbshipit-source-id: 83a8d997e99361e3fcc4472d484d3759f73ed964
2020-05-21 11:31:56 -07:00
dependabot-preview[bot]
74ce4f1e5b Bump ts-jest from 25.4.0 to 26.0.0 in /desktop (#1172)
Summary:
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.4.0 to 26.0.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md">ts-jest's changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/kulshekhar/ts-jest/compare/v25.5.1...v26.0.0">26.0.0</a> (2020-05-15)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> return <code>undefined</code> for <code>getScriptVersion</code> when a file doesn't exist in memory cache (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1641">#1641</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/6851b8e">6851b8e</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>support Jest v26 (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1602">#1602</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/23b7741">23b7741</a>)</li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>Requires a minimum of TypeScript v3.8</li>
<li>Drop support for Node 8</li>
</ul>
<p><a name="25.5.1"></a></p>
<h2><a href="https://github.com/kulshekhar/ts-jest/compare/v25.5.0...v25.5.1">25.5.1</a> (2020-05-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> don't resolve files from build folder for <code>projectReferences</code> (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1614">#1614</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/74b92d3">74b92d3</a>)</li>
<li><strong>config:</strong> don't set <code>include</code> value of <code>tsconfig</code> to empty array (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1606">#1606</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/8a29aaa">8a29aaa</a>)</li>
</ul>
<p><a name="25.5.0"></a></p>
<h1><a href="https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0">25.5.0</a> (2020-05-05)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> make <code>projectReferences</code> work with <code>isolatedModules: false</code> (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1541">#1541</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/3e8efbe">3e8efbe</a>)</li>
<li><strong>compiler:</strong> allow using <code>files</code> provided by <code>tsconfig</code> (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1562">#1562</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/a9f02bd">a9f02bd</a>)</li>
<li><strong>config:</strong> verify <code>testMatchPatterns</code> contain RegExp instance or string type values (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1569">#1569</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/7f85bab">7f85bab</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>config:</strong> add <code>tsconfig</code> alias to <code>tsConfig</code> option (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1565">#1565</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/c10eb6d">c10eb6d</a>)</li>
<li><strong>config:</strong> define 'ts-jest' on <code>ConfigGlobals</code> interface of <code>jest/types</code> (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1592">#1592</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/4526392">4526392</a>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>compiler:</strong> don’t write compile output to file system but rely on jest cache (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1561">#1561</a>) (<a href="https://github.com/kulshekhar/ts-jest/commit/d11a4ea">d11a4ea</a>)</li>
</ul>
</tr></table> ... (truncated)
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bcf26974c4"><code>bcf2697</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1649">#1649</a> from kulshekhar/dependabot/npm_and_yarn/types/fs-ext...</li>
<li><a href="497f5c994f"><code>497f5c9</code></a> build(deps-dev): bump types/fs-extra from 8.1.0 to 9.0.0</li>
<li><a href="35001a2c7c"><code>35001a2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1646">#1646</a> from ahnpnl/v26.0.0</li>
<li><a href="1db8be5ec4"><code>1db8be5</code></a> chore(release): 26.0.0</li>
<li><a href="47007f13ff"><code>47007f1</code></a> build(deps-dev): bump types/js-yaml from 3.12.3 to 3.12.4 (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1644">#1644</a>)</li>
<li><a href="9741de4c2a"><code>9741de4</code></a> build(deps-dev): bump types/cross-spawn from 6.0.1 to 6.0.2 (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1643">#1643</a>)</li>
<li><a href="6851b8eae8"><code>6851b8e</code></a> fix(compiler): return <code>undefined</code> for <code>getScriptVersion</code> when a file doesn't ...</li>
<li><a href="6b22e08833"><code>6b22e08</code></a> build(deps-dev): bump types/yargs from 15.0.4 to 15.0.5 (<a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1638">#1638</a>)</li>
<li><a href="b58064c4c7"><code>b58064c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kulshekhar/ts-jest/issues/1637">#1637</a> from kulshekhar/dependabot/npm_and_yarn/types/jest-2...</li>
<li><a href="5fc19c06ff"><code>5fc19c0</code></a> build(deps-dev): bump types/jest from 25.2.1 to 25.2.2</li>
<li>Additional commits viewable in <a href="https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v26.0.0">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~tsjest">tsjest</a>, a new releaser for ts-jest since your current version.</p>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=ts-jest&package-manager=npm_and_yarn&previous-version=25.4.0&new-version=26.0.0)](https://dependabot.com/compatibility-score/?dependency-name=ts-jest&package-manager=npm_and_yarn&previous-version=25.4.0&new-version=26.0.0)

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)

 ---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<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)
- `dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1172

Reviewed By: mweststrate

Differential Revision: D21625494

Pulled By: cekkaewnumchai

fbshipit-source-id: 21d7efa62672469024509ecd939fdf0636486053
2020-05-20 06:58:37 -07:00
generatedunixname89002005306973
4e618198cb Flipper Release: v0.43.0
Summary: Releasing version 0.43.0

Reviewed By: cekkaewnumchai

Differential Revision: D21639652

fbshipit-source-id: 5a775f6361283b2e9b2540b054afad497dab2a22
2020-05-19 08:00:52 -07:00
Pascal Hartig
d7035b7e7d Whitelist cjs extension for metro
Summary: This is required for the new release of promisify-child-process.

Reviewed By: mweststrate

Differential Revision: D21543812

fbshipit-source-id: dc254ea51381696b9927f7c62dd36e10ef00fcac
2020-05-13 10:22:02 -07:00
generatedunixname89002005306973
9bead5e05c Flipper Release: v0.42.0
Summary: Releasing version 0.42.0

Reviewed By: passy

Differential Revision: D21520625

fbshipit-source-id: 9f3ce5739a0856de84b18df3c640e5218fd3182e
2020-05-13 02:16:13 -07:00
generatedunixname89002005306973
96d5949c19 Flipper Release: v0.41.0
Summary: Releasing version 0.41.0

Reviewed By: jknoxville

Differential Revision: D21402376

fbshipit-source-id: c2b5194afbb8f086097eb1c6fb337b950b4dffe7
2020-05-05 08:31:29 -07:00
generatedunixname89002005306973
bd320b94e1 Flipper Release: v0.40.0
Summary: Releasing version 0.40.0

Reviewed By: nikoant

Differential Revision: D21302037

fbshipit-source-id: 2f2aeaf0aaf7a0d2fb65b21b6243c9ecd2684cdc
2020-04-29 08:33:04 -07:00
Anton Nikolaev
1cf3c30b7c "migrate" command for flipper-pkg tool
Summary: "migrate" command for easy migration of existing Flipper plugins to the specification version 2.

Reviewed By: passy

Differential Revision: D21253913

fbshipit-source-id: 9edb170fbaa10e9c3f670d5d68e69f4f6106c151
2020-04-28 05:01:06 -07:00
Anton Nikolaev
21c574ac80 "lint" command for flipper-pkg tool
Summary:
Implemented json schema for flipper plugin package.json and used it for validation in "flipper-pkg lint" command.

Nice thing about json schema is that it not only allows to validate json, but also can be referenced using "$schema" property in json so IDEs like VSCode can find it and use for code completion, validation and to show properties documentation. I'm going to deploy the schema as a part of documentation website so it can be referenced as https://fbflipper.com/schemas/plugin-package/v2.json.

Also the "$schema" field can be used instead of "specVersion" to determine the specification according to which the plugin is defined. E.g., if specification version 3 would be created, it will be described in schema https://fbflipper.com/schemas/plugin-package/v3.json, etc.

Reviewed By: passy

Differential Revision: D21228294

fbshipit-source-id: f21351e584ef936a7d6b314436448489691f83a6
2020-04-27 17:34:11 -07:00
Anton Nikolaev
ec07272c78 Linter checks for extraneous dependencies
Summary: Added eslint rule "no-extraneous-imports" which disallow using modules which are not listed as dependencies in the corresponding package.json. Fixed a bunch of reported errors after the rule applied.

Reviewed By: passy

Differential Revision: D21186848

fbshipit-source-id: 0af9ac4b3fffdfd0ab7c23ae4ff12a3f5989d5e9
2020-04-23 05:33:20 -07:00
generatedunixname89002005306973
99c5a427c7 Flipper Release: v0.39.0
Summary: Releasing version 0.39.0

Reviewed By: mweststrate

Differential Revision: D21199718

fbshipit-source-id: 1082098a2b4fcfaa7b7efb201e8321331fd4bdc4
2020-04-23 03:57:12 -07:00
Anton Nikolaev
2595e40c59 Fixed plugin compilation in release build
Summary: Fixed plugin compilation in release build. One dependency was missing from the final package.

Reviewed By: jknoxville, passy

Differential Revision: D21174687

fbshipit-source-id: 311e04b3ab782093bdbb8f1b81191380320e94d0
2020-04-22 04:22:28 -07:00
Michel Weststrate
18b88a7e03 Flipper Release: v0.38.0
Summary: Releasing version 0.38.0

Reviewed By: cekkaewnumchai

Differential Revision: D21155371

fbshipit-source-id: 554393fc357135cd8538c9b77eee023f8a3e1525
2020-04-21 13:10:56 -07:00
Pascal Hartig
9c18a98f89 Enable build minification
Summary: This shaves another ~6MB of the zipped build. Less than I would have thought, but I haven't looked at the alternative options so far at all.

Reviewed By: nikoant

Differential Revision: D21131772

fbshipit-source-id: 641515d6f36fdeeffa5be81d64c2c1043a9e4e34
2020-04-21 02:10:49 -07:00
Anton Nikolaev
2cf9eeb224 Fix the tests failing on Windows (#1036)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1036

Fixed the tests failing on Windows

Reviewed By: passy

Differential Revision: D21144338

fbshipit-source-id: 3b76a5d42a764a2eec89e26ee0ca94bd739e46bd
2020-04-21 01:42:51 -07:00
Anton Nikolaev
3ff2d3bf99 Add "id" field to Flipper plugin manifest
Summary:
Added "id" field to Flipper plugin manifest which is used to match native and desktop plugin parts. Before that, "name" field was used both as npm package name and as plugin id.

The problem is that currently there are a lot of plugins which has invalid values in "name", e.g. not starting with "flipper-package-", or containing upper cased letters.

Simple renaming of "name" field can be very problematic, so we need a new field to avoid any breaking changes and keep historical analytics data which is also bound to plugin id.

Reviewed By: mweststrate

Differential Revision: D21129689

fbshipit-source-id: efd143c82a6a802cc0b5438fd3f509bd99aded0e
2020-04-20 11:14:36 -07:00
Anton Nikolaev
8a7470556e Re-use pkg-lib for runtime plugin compilation
Summary: Re-use the same function for plugin building both at publishing time by "flipper-pkg" and in runtime by Flipper itself.

Reviewed By: jknoxville

Differential Revision: D21129685

fbshipit-source-id: b7bff6737310352d28a14223128f127ac4d2eebf
2020-04-20 06:59:38 -07:00
Anton Nikolaev
ca2d04a5da Versioning for plugin format
Summary:
Added versioning for plugin format.

The first version is where "main" points to source code entry and plugins are bundled by Flipper in run-time on loading them.

The second version is where "main" points to the already existing bundle and Flipper just loads it without bundling. The plugins of version 2 must be bundled using "flipper-pkg" tool before publishing.

Changelog: Support new packaging format for plugins.

Reviewed By: mweststrate

Differential Revision: D21074173

fbshipit-source-id: 7b70250e48e5bd5d359c96149fb5b14e67783c4d
2020-04-20 06:03:16 -07:00
Anton Nikolaev
85b56ffc2a Fix typing dependencies for pkg and pkg-lib
Summary: Set typings as devDependencies for pkg and pkg-lib packages

Reviewed By: passy

Differential Revision: D21092027

fbshipit-source-id: 7750f1796458bd88ea9ff620f3bb2e3e14ea7ca0
2020-04-20 04:30:24 -07:00
Anton Nikolaev
21b79af5f2 Split package "flipper-pkg" into two: lib and cli
Summary: "flipper-pkg" added ~2MB to Flipper disttributive size, because of heavy dependencies which are only required for CLI functionality. See size warning in diff D21068373 in this stack where I added pkg as dependency to flipper. Here I'm splitting it into library and CLI packages, so Flipper app will only reference the library.

Reviewed By: passy

Differential Revision: D21087336

fbshipit-source-id: d9d62f1e75a835d1c0fa78ff1addb0d9a761a9c7
2020-04-17 10:01:31 -07:00