Commit Graph

16 Commits

Author SHA1 Message Date
Victor Hom
7e3209b701 add reading wiki link to places
Summary:
Release Note: none

I just wanted to add the reading links as suggested in #1887

arrived to the wiki from Twitter -> the issue -> to the Wiki :)

Let me know if you want the copy updated and shifted around anywhere.
Closes https://github.com/facebook/prepack/pull/1948

Differential Revision: D7985678

Pulled By: NTillmann

fbshipit-source-id: 22cd999bf4ff8dd26618b06d94f751834533b726
2018-05-13 09:25:59 -07:00
Bernard Lin
98b78dcfba fix typo
Summary:
Release Note: none
Closes https://github.com/facebook/prepack/pull/1909

Differential Revision: D7925196

Pulled By: trueadm

fbshipit-source-id: 3461e2f75f7d207e7b6e04cf9b319f15612b1945
2018-05-09 03:18:20 -07:00
Peter van der Zee
a0703ec2a0 Upgrade Prettier to v1.12.1 on fbsource
Summary:
Updates Prettier to v1.12.1, using `xplat/js/scripts/prettier-bump.js` based on the playbook by https://our.intern.facebook.com/intern/wiki/Prettier/upgrade-guide/

All changes related to upgrading or running Prettier

allow-many-files
allow-large-files
bypass-lint
drop-conflicts
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

Reviewed By: benjaffe, ryanmce, yungsters

Differential Revision: D7652946

fbshipit-source-id: 396d45c675e93f2298cd2920d927630c81867447
2018-04-19 02:37:00 -07:00
Nikolai Tillmann
6ac4691295 Updating website to list most relevant information and no outdated (wrong) information.
Summary:
Release notes: Website update
Closes https://github.com/facebook/prepack/pull/1740

Differential Revision: D7603811

Pulled By: NTillmann

fbshipit-source-id: c905aa7d5d89b6ead13936442afb68e1f4dc6e85
2018-04-12 12:53:38 -07:00
Nikolai Tillmann
7579c5fc0b Introducting new option --invariantLevel NUMBER and dropping --omitInvariants
Summary:
Release notes: Introducting new option --invariantLevel NUMBER and dropping --omitInvariants

The new default is invariant level 0, which corresponds to the old --omitInvariants.
Level 1 is roughly what we used to do: Check invariants on (derived) abstract values.
Level 2 implements #1180: Checking that all accesses to built-ins do what Prepack expects them to do, including checks for when properties on built-ins are absent.
Level 3 adds checks for internal consistency, basically an internal debug level.

The serializer tests now run with the highest invariant level by default. The added invariants found a few issues that got addressed, including:
- Prepack exposes a TypedArray prototype, which is not a real thing. It's now marked as `__refuseSerialization`, and no invariants are emitted for such things.
- Global variables / properties on the global object are special. Those are not yet handled at level 2.
- Accesses to Prepack magic functions that generally start with `__` should not produce invariant checks.
- Magic code generation for loops should not take into account objects that are `__refuseSerialization`.
- All invariant statements get a unique id to make it easier to locate them.
- I marked some test cases which depend on counting occurrences in the output as "// omit invariants", as the additional invariants increased some such counts.

As part of testing, I also found it necessary to make the --invariantMode more useful; it now also allows specifying nativeLoggingHook which is the preferred way of logging in React Native.

To reduce the number of checks by a few orders of magnitude in practice, each property is only checked on first access. This is tracked by a global variable `__checkedBindings`.

This pull requests incorporates all aspects of the #1709 (which I abandoned).
Closes https://github.com/facebook/prepack/pull/1724

Reviewed By: simonhj

Differential Revision: D7575091

Pulled By: NTillmann

fbshipit-source-id: 585cd224ce66882f8e5f27d88c1ad08afeb96ee1
2018-04-12 11:58:25 -07:00
Nikolai Tillmann
032f71403f Removing --abstractEffectsInAdditionalFunctions option
Summary:
Release notes: Removing --abstractEffectsInAdditionalFunctions option

It is now the new default, as nothing seems to depend on the old behavior.
Closes https://github.com/facebook/prepack/pull/1623

Differential Revision: D7342083

Pulled By: NTillmann

fbshipit-source-id: c02d13bddd0ff3d8a113a6a5a83c1bf35c96ba4d
2018-03-20 15:04:24 -07:00
Dominic Gannaway
2eeaf722a4 Add abstractEffectsInAdditionalFunctions to REPL
Summary:
Release notes: none

Add `abstractEffectsInAdditionalFunctions` to be `true` for the REPL so we can demo cool features :)
Closes https://github.com/facebook/prepack/pull/1591

Differential Revision: D7272579

Pulled By: trueadm

fbshipit-source-id: e91a2665b50150213d3656956c673ec1efc15971
2018-03-14 09:20:22 -07:00
Dominic Gannaway
245a7ad7c9 Add "node-react" compatibility mode
Summary:
Release notes: adds "node-react" compatibility mode

Adds the "node-react" compatibility mode, which is like "fb-www", but doesn't contain the internal FB mocks. This mode is ideal for library authors who might want to experiment with the features of the React compiler in an environment that has basic React/Relay mocks as well as `require` and `module.exports` partial support.

I'll be adding relevant documentation for this on the wiki too.
Closes https://github.com/facebook/prepack/pull/1528

Differential Revision: D7149660

Pulled By: trueadm

fbshipit-source-id: 3f00fa01bb881722b270393a27f817911c5a5256
2018-03-04 12:24:33 -08:00
Phani Pattapu
2afe2c51f1 Adding lazyObjectsRuntime option to the Prepack Website
Summary:
This addresses the issue https://github.com/facebook/prepack/issues/1282 although the issue also requests for --additionalFunctions option which is not part of this commit. User should now be able to see --lazyObjectsRuntime option in the options list on https://prepack.io/repl.html. Ideally this should be an enum but this will accept a freeform string in this revision.
Closes https://github.com/facebook/prepack/pull/1475

Differential Revision: D7059756

Pulled By: phanipattapu

fbshipit-source-id: 588f688a52e81d065cf19ac1fbd358a9332b81a0
2018-02-22 14:10:34 -08:00
Dominic Gannaway
414cc67b93 Re-adds Flow parsing and stripping when option is enabled
Summary:
Release notes: adds option to parse and strip Flow annotations

In a [tweet I made at the end of last year](https://twitter.com/trueadm/status/944908776896978946) I linked to a REPL example that contained Flow type annotations. The example is now broken as we removed Flow type annotation parsing. :(

This PR adds this back behind the option `stripFlow` which is now enabled by default on the REPL and for React tests. I've also added a test to match the REPL for regression checking so this doesn't happen.
Closes https://github.com/facebook/prepack/pull/1439

Differential Revision: D6976663

Pulled By: trueadm

fbshipit-source-id: 47e28bc0986f1a1a252180f26200ce32314a4e5b
2018-02-13 08:48:24 -08:00
Dominic Gannaway
b891ee1166 Changes to React mocks for internal testing
Summary:
Release notes: none

This PR changes `react-mocks` -> `fb-www` and adds some `RelayModern` mocks. This is mainly for internal testing to unblock work.
Closes https://github.com/facebook/prepack/pull/1347

Differential Revision: D6798242

Pulled By: trueadm

fbshipit-source-id: 9c8a4aeef074e2a29e44fdd26352633f47bbc862
2018-01-24 11:42:07 -08:00
Jeffrey Tan
50d9168dfc Fix duplicate edges issue in Prepack heap visualization
Summary:
Release Note: Fix duplicate edges issue in Prepack heap visualization.

This PR did two things:
1. Fix duplicate edges issue in Prepack heap visualization by using unique identifier for edge id field.(#1300)
2. Prepack heap visualization supports two formats: 1. Dot language formatted used by CLI. 2. JSON format used by Vis.js library to visualize in website REPL. This PR allows both.
Closes https://github.com/facebook/prepack/pull/1308

Differential Revision: D6656452

Pulled By: yinghuitan

fbshipit-source-id: 123ec5c9a031bc43e0d71c1b0510956ef1463143
2018-01-03 15:13:05 -08:00
Dominic Gannaway
1e1d94517b Extract out website changes for REPL.js
Summary:
Release notes: none

Extracted our website changes from commit: 1dbefcbd83

This was done as suggested in 1dbefcbd83 (commitcomment-26606024).
Closes https://github.com/facebook/prepack/pull/1310

Differential Revision: D6655550

Pulled By: trueadm

fbshipit-source-id: b603657a056ee5124bab7fa85ea277a19509268e
2018-01-03 05:53:23 -08:00
artiebits
7b3d0dba83 Fix website dropdowns
Summary:
Issue https://github.com/facebook/prepack/issues/1296.

The previous version of Tether Select that was used in the website had `z-index: 100;` (still can check it in `gh-pages` branch) but in the version that we use from CDN, in order to reduce the size of Prepack repo, there is no `z-index`. So I've added it to the website styles.
Closes https://github.com/facebook/prepack/pull/1298

Differential Revision: D6638548

Pulled By: NTillmann

fbshipit-source-id: 1fb05a37d7bd83a71936ac4aa4ed9a138825f032
2017-12-27 09:58:58 -08:00
Wuhan Zhou
45383c8785 Display heap graph in website
Summary:
Release note: add heap graph visualization to website
Moved from #1243

- read in the heap graph data from prepackSources result
- display the graph using [visjs](http://visjs.org/)
Closes https://github.com/facebook/prepack/pull/1265

Differential Revision: D6571860

Pulled By: JWZ2018

fbshipit-source-id: 4c2d9bae91eaffff58df8909214d4c7bc56d1359
2017-12-14 15:03:35 -08:00
James Nolan
3c9c6ac2a5 Make master/docs a single source of truth for gh-pages
Summary:
Release note: none

To address issue #956 .

The idea is to have all documentation (aka "the website") in a single `docs/` directory on the `master` branch like [Jest](https://github.com/facebook/jest/tree/master/docs) and [Relay](https://github.com/facebook/relay/tree/master/docs) do. This directory then serves as a single source of truth to publish the `gh-pages` branch.

This PR:
- Moves the current content of the `gh-pages` branch to a `docs/` directory in `master`
- Provides a bash script for maintainers to easily publish the `gh-pages` branch from the `docs/` directory. The script also builds `prepack.min.js` from master to make sure gh-pages always has the latest version of prepack.

Additionally, I noticed the `gh-pages` branch had two `prepack.min.js` files (one in `./` and one in `./js/`). I removed the first one because it is apparently not used but it may break other websites if they references that file.

0. Fork the repo to avoid modifying the real website

1. Change the site
`> git checkout master`
`> echo ".nav { background-color: chartreuse; }" >> docs/css/style.css`
`> git add docs/css/style.css`
`> commit -m "The navigation bar looks better in green"`
`> git push`

2. Run the publication script:
`> ./scripts/publish-gh-pages.sh`

3. Verify that the gh-pages has been updated:
`> git checkout gh-pages`
`> git pull`
`> git diff HEAD~ # should show the line you added`
Closes https://github.com/facebook/prepack/pull/1223

Differential Revision: D6547395

Pulled By: j-nolan

fbshipit-source-id: 6e6d3aec97c0bcc2555c421d6f4a889bcd8df208
2017-12-12 12:10:05 -08:00