Skip to content

Commit 5fe148b

Browse files
committed
Add Prettier to CI
1 parent f719649 commit 5fe148b

17 files changed

+362
-291
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
3434
- name: Install dependencies
3535
run: npm ci
36+
- name: Prettier
37+
run: npx prettier . --check
3638
- name: Lint
3739
run: npm run lint
3840
- name: Build with Next.js

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This is a [Next.js](https://nextjs.org/) project that makes up the [Ruffle websi
22

33
## Developing locally
44

5-
To run the development server locally, use `npm run dev`. Then open up [http://localhost:3000](http://localhost:3000) and see the pages live.
5+
To run the development server locally, use `npm run dev`. Then open up [http://localhost:3000](http://localhost:3000) and see the pages live.
66

77
To build it as a static website (as we do in production), use `npm run build`.
88

Lines changed: 71 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,71 @@
1-
---
2-
title: "First post, progress report!"
3-
date: 2023-03-12 01:23:00 +0100
4-
author: nosamu
5-
icon: /undraw/undraw_welcoming_re_x0qo.svg
6-
---
7-
Get ready for the biggest Ruffle announcement yet! And the first one on the blog!
8-
9-
---
10-
11-
### Huge improvements to Ruffle's AVM1 engine accuracy!
12-
Thanks to a massive code refactor by [@CUB3D](https://github.com/CUB3D/), dozens upon dozens of ActionScript 2 games have been fixed! Here are just a few of them:
13-
- [Chibi Knight](https://www.newgrounds.com/portal/view/526470)
14-
- [Xeno Tactic 2](https://www.newgrounds.com/portal/view/438241/format/flash?emulate=flash)
15-
- [Trojan War](https://www.newgrounds.com/portal/view/604949/format/flash?emulate=flash)
16-
- [Frontline Defense](https://www.kongregate.com/games/kazama_bee/frontline-defense-first-assault)
17-
- [Bubble Bobble: The Revival](https://flasharch.com/en/archive/play/084db17094dc7452f01da0905d7eb516)
18-
- [Cube Colossus](https://www.newgrounds.com/portal/view/507205/format/flash?emulate=flash)
19-
- [Chronotron](https://www.kongregate.com/games/Scarybug/chronotron)
20-
- [The Powerpuff Girls: Attack of the Puppybots](https://flasharch.com/en/archive/play/b93354279e9788b849f83ef78f52cbbb)
21-
- [Extreme Pamplona](https://flasharch.com/en/archive/play/e36aac73914ec8672218317e000615d7)
22-
23-
### Incredible progress in AVM2 (ActionScript 3) support!
24-
- Our website now has [a page listing exactly what ActionScript 3 APIs we have implemented](https://ruffle.rs/compatibility/avm2), making it easy to follow our progress. It will be frequently updated!
25-
- XML support is rapidly improving! ActionScript 3 games tend to use a wide variety of XML methods. As Ruffle gains support for these methods, games are springing to life!
26-
- Several problems that caused unresponsive buttons and menus have been fixed. Unclickable buttons in ActionScript 3 games are (mostly) a thing of the past!
27-
- Other major refactors are in progress to improve Ruffle's compatibility with ActionScript 3 frameworks like Haxe.
28-
- [@Aaron1011](https://github.com/Aaron1011/) is working on **Stage3D support**! Thanks to his work, the gorgeous interstellar strategy game Solarmax 2 is now fully playable in Ruffle on the desktop player! Check out the video below.
29-
30-
<video muted autoplay controls>
31-
<source src="/2023-03-12-progress-report/ruffle_solarmax2.mp4" type="video/mp4">
32-
</video>
33-
34-
Many of the fan-favorite **Flipline games are now playable**! Check them out:
35-
- [Papa's Burgeria](https://www.kongregate.com/games/FliplineStudios/papas-burgeria)
36-
- [Jacksmith](https://www.kongregate.com/games/FliplineStudios/jacksmith)
37-
- [Papa's Cheeseria](https://www.flipline.com/games/papascheeseria/index.html) (requires the Ruffle Chrome extension)
38-
- [Papa's Bakeria](https://www.flipline.com/games/papasbakeria/index.html) (requires the Ruffle Chrome extension)
39-
40-
<video muted autoplay controls>
41-
<source src="/2023-03-12-progress-report/ruffle_burgeria.mp4" type="video/mp4">
42-
</video>
43-
44-
Here are just a few more of the many ActionScript 3 games that are playable today in Ruffle!
45-
- [Canabalt](https://www.newgrounds.com/portal/view/510303)
46-
- [Bloons Tower Defense 3](https://www.newgrounds.com/portal/view/463445/format/flash?emulate=flash)
47-
- [Diggy](https://www.kongregate.com/games/Vogd/diggy)
48-
- [Wooden Path 2](https://www.kongregate.com/games/Remivision/wooden-path-2)
49-
- [Fracuum](https://www.newgrounds.com/portal/view/594354)
50-
- [Dino Run: Marathon of Doom](https://www.newgrounds.com/portal/view/566176)
51-
52-
### Last but not least, support for **mobile devices** is improving in a big way!
53-
- **Text input boxes** are finally supported on mobile devices! Tapping on a text box within Flash content now brings up the soft keyboard, so you can type into it without using a bluetooth keyboard or other workarounds.
54-
- The **context menu** finally works on iOS! It is activated by a long-press on the screen. To stop this behavior if needed, simply tap the "Hide this menu" option.
55-
56-
<video muted autoplay controls>
57-
<source src="/2023-03-12-progress-report/Ruffle_Kongregate_Pizzeria_iPhone.mov" type="video/mp4">
58-
</video>
59-
60-
**We have even more improvements coming very soon!**
61-
- The latest releases now have **dynamic audio buffering**, making audio playback in the most demanding content much smoother! (Thanks to [@szőlő](https://github.com/torokati44/))
62-
- A bug that causes some AVM2 games' intro sounds to repeat over and over will soon be fixed. (Thanks to [@Aaron1011](https://github.com/Aaron1011/))
63-
- [@Dinnerbone](https://github.com/Dinnerbone/) is working on improving drawing accuracy for thin/hairline strokes and scaled objects. [You can follow his progress here](https://github.com/ruffle-rs/ruffle/pull/9981).
1+
---
2+
title: "First post, progress report!"
3+
date: 2023-03-12 01:23:00 +0100
4+
author: nosamu
5+
icon: /undraw/undraw_welcoming_re_x0qo.svg
6+
---
7+
8+
Get ready for the biggest Ruffle announcement yet! And the first one on the blog!
9+
10+
---
11+
12+
### Huge improvements to Ruffle's AVM1 engine accuracy!
13+
14+
Thanks to a massive code refactor by [@CUB3D](https://github.com/CUB3D/), dozens upon dozens of ActionScript 2 games have been fixed! Here are just a few of them:
15+
16+
- [Chibi Knight](https://www.newgrounds.com/portal/view/526470)
17+
- [Xeno Tactic 2](https://www.newgrounds.com/portal/view/438241/format/flash?emulate=flash)
18+
- [Trojan War](https://www.newgrounds.com/portal/view/604949/format/flash?emulate=flash)
19+
- [Frontline Defense](https://www.kongregate.com/games/kazama_bee/frontline-defense-first-assault)
20+
- [Bubble Bobble: The Revival](https://flasharch.com/en/archive/play/084db17094dc7452f01da0905d7eb516)
21+
- [Cube Colossus](https://www.newgrounds.com/portal/view/507205/format/flash?emulate=flash)
22+
- [Chronotron](https://www.kongregate.com/games/Scarybug/chronotron)
23+
- [The Powerpuff Girls: Attack of the Puppybots](https://flasharch.com/en/archive/play/b93354279e9788b849f83ef78f52cbbb)
24+
- [Extreme Pamplona](https://flasharch.com/en/archive/play/e36aac73914ec8672218317e000615d7)
25+
26+
### Incredible progress in AVM2 (ActionScript 3) support!
27+
28+
- Our website now has [a page listing exactly what ActionScript 3 APIs we have implemented](https://ruffle.rs/compatibility/avm2), making it easy to follow our progress. It will be frequently updated!
29+
- XML support is rapidly improving! ActionScript 3 games tend to use a wide variety of XML methods. As Ruffle gains support for these methods, games are springing to life!
30+
- Several problems that caused unresponsive buttons and menus have been fixed. Unclickable buttons in ActionScript 3 games are (mostly) a thing of the past!
31+
- Other major refactors are in progress to improve Ruffle's compatibility with ActionScript 3 frameworks like Haxe.
32+
- [@Aaron1011](https://github.com/Aaron1011/) is working on **Stage3D support**! Thanks to his work, the gorgeous interstellar strategy game Solarmax 2 is now fully playable in Ruffle on the desktop player! Check out the video below.
33+
34+
<video muted autoplay controls>
35+
<source src="/2023-03-12-progress-report/ruffle_solarmax2.mp4" type="video/mp4">
36+
</video>
37+
38+
Many of the fan-favorite **Flipline games are now playable**! Check them out:
39+
40+
- [Papa's Burgeria](https://www.kongregate.com/games/FliplineStudios/papas-burgeria)
41+
- [Jacksmith](https://www.kongregate.com/games/FliplineStudios/jacksmith)
42+
- [Papa's Cheeseria](https://www.flipline.com/games/papascheeseria/index.html) (requires the Ruffle Chrome extension)
43+
- [Papa's Bakeria](https://www.flipline.com/games/papasbakeria/index.html) (requires the Ruffle Chrome extension)
44+
45+
<video muted autoplay controls>
46+
<source src="/2023-03-12-progress-report/ruffle_burgeria.mp4" type="video/mp4">
47+
</video>
48+
49+
Here are just a few more of the many ActionScript 3 games that are playable today in Ruffle!
50+
51+
- [Canabalt](https://www.newgrounds.com/portal/view/510303)
52+
- [Bloons Tower Defense 3](https://www.newgrounds.com/portal/view/463445/format/flash?emulate=flash)
53+
- [Diggy](https://www.kongregate.com/games/Vogd/diggy)
54+
- [Wooden Path 2](https://www.kongregate.com/games/Remivision/wooden-path-2)
55+
- [Fracuum](https://www.newgrounds.com/portal/view/594354)
56+
- [Dino Run: Marathon of Doom](https://www.newgrounds.com/portal/view/566176)
57+
58+
### Last but not least, support for **mobile devices** is improving in a big way!
59+
60+
- **Text input boxes** are finally supported on mobile devices! Tapping on a text box within Flash content now brings up the soft keyboard, so you can type into it without using a bluetooth keyboard or other workarounds.
61+
- The **context menu** finally works on iOS! It is activated by a long-press on the screen. To stop this behavior if needed, simply tap the "Hide this menu" option.
62+
63+
<video muted autoplay controls>
64+
<source src="/2023-03-12-progress-report/Ruffle_Kongregate_Pizzeria_iPhone.mov" type="video/mp4">
65+
</video>
66+
67+
**We have even more improvements coming very soon!**
68+
69+
- The latest releases now have **dynamic audio buffering**, making audio playback in the most demanding content much smoother! (Thanks to [@szőlő](https://github.com/torokati44/))
70+
- A bug that causes some AVM2 games' intro sounds to repeat over and over will soon be fixed. (Thanks to [@Aaron1011](https://github.com/Aaron1011/))
71+
- [@Dinnerbone](https://github.com/Dinnerbone/) is working on improving drawing accuracy for thin/hairline strokes and scaled objects. [You can follow his progress here](https://github.com/ruffle-rs/ruffle/pull/9981).

blog_posts/2023-04-23-mozilla-extension-postmortem.markdown

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: "A post-mortem of Ruffle's removal from addons.mozilla.org"
3-
date: 2023-04-23 04:07:00 -0400
2+
title: "A post-mortem of Ruffle's removal from addons.mozilla.org"
3+
date: 2023-04-23 04:07:00 -0400
44
author: kmeisthax
55
icon: /undraw/undraw_feeling_blue_-4-b7q.svg
66
---
77

88
On December 11th, 2022, our extension submissions to Firefox's extension repository, addons.mozilla.org (abbreviated as A.M.O), got stuck in review. This was shortly followed up with a far scarier notice a few days later on the 14th:
99

10-
>Ruffle will be disabled on addons.mozilla.org
11-
>Due to issues discovered during the review process, one or more versions of your add-on Ruffle will be disabled on addons.mozilla.org in 14 day(s).
10+
> Ruffle will be disabled on addons.mozilla.org
11+
> Due to issues discovered during the review process, one or more versions of your add-on Ruffle will be disabled on addons.mozilla.org in 14 day(s).
1212
1313
What followed was a list of every prior submitted version of Ruffle, and a statement requesting corresponding source code. Following this, Ruffle would be unavailable for Firefox users for two months, and we spent an additional month and a half improving our CI processes to support source code review requirements for Mozilla. This is now behind us, but it is important to know why it happened.
1414

@@ -26,15 +26,15 @@ I continued pressing on with reviewer ping-pong on Mike's behalf. 0.1.0.685 was
2626

2727
Mozilla sent over the version of the extension that they built. My first instinct was to diff all the files in both XPIs. This turns up three major categories of differences:
2828

29-
* Version data embedded in various JavaScript files is wrong.
30-
* The manifest file is missing the extension ID.
31-
* The WASM files themselves are different by about four bytes. Because Webpack names the files by hash, this causes knock-on differences with file names elsewhere.
29+
- Version data embedded in various JavaScript files is wrong.
30+
- The manifest file is missing the extension ID.
31+
- The WASM files themselves are different by about four bytes. Because Webpack names the files by hash, this causes knock-on differences with file names elsewhere.
3232

3333
For my own sanity, I only considered differences "up to ZIP isomorphism." The packaging format used for Firefox extensions, XPI, is a renamed ZIP file with specific contents. This is a common pattern - APK, CRX, EPUB, DOCX, and even Adobe Animate's own XFL format are PKZIP bitstreams with additional constraints. Problem is, ZIP files can have dates in them, and the order in which files are stored will be determined by how the operating system and filesystem enumerate directories. All of which would fail a repro check if Mozilla wanted bit-identical XPIs.
3434

3535
The first two problems were caused by various build system scripts relying on environment data that is only available during the nightly build process. Said scripts were changed to instead get that information from a version seal file, if available. The nightly build process would also generate special source ZIPs with this version seal present. A [few](https://github.com/ruffle-rs/ruffle/pull/9244) [rounds](https://github.com/ruffle-rs/ruffle/pull/9344) [of](https://github.com/ruffle-rs/ruffle/pull/9353) [back and](https://github.com/ruffle-rs/ruffle/pull/9570) [forth](https://github.com/ruffle-rs/ruffle/pull/9633) with GitHub Actions and this reproducibility hole was filled.
3636

37-
The WASM files would be more complicated. When building my laptop running Ubuntu, I would only get the four bytes difference in WASM if I built with my clock set ahead by several days. It was two entries in a dispatch table that has been reordered, and this table only existed in *one* of the two WASM files. We'd recently added a "dual-WASM" mode that enabled better optimizations for newer browsers. Discussions in maintainer chat considered either disabling dual-WASM (divinity76 was busy [adding it to the Dockerfile](https://github.com/ruffle-rs/ruffle/pull/9121#issuecomment-1396261394)) or writing some complicated "WASM sorter" to ensure the table was ordered correctly.
37+
The WASM files would be more complicated. When building my laptop running Ubuntu, I would only get the four bytes difference in WASM if I built with my clock set ahead by several days. It was two entries in a dispatch table that has been reordered, and this table only existed in _one_ of the two WASM files. We'd recently added a "dual-WASM" mode that enabled better optimizations for newer browsers. Discussions in maintainer chat considered either disabling dual-WASM (divinity76 was busy [adding it to the Dockerfile](https://github.com/ruffle-rs/ruffle/pull/9121#issuecomment-1396261394)) or writing some complicated "WASM sorter" to ensure the table was ordered correctly.
3838

3939
It turned out that this difference was a fluke. Another test build done on February 2nd was identical across multiple runs. I submitted 0.1.0.742 the next day.
4040

@@ -43,6 +43,7 @@ It turned out that this difference was a fluke. Another test build done on Febru
4343
Mozilla took more than a week to review this submission. The first time they looked for the XPI in the wrong place. The second time they caught actually obfuscated code in our extension script:
4444

4545
> Your add-on contains minified, concatenated or otherwise machine-generated code. (boilerplate response omitted)
46+
>
4647
> - web/packages/extension/src/content.ts [line 145-147](https://github.com/ruffle-rs/ruffle/pull/9588/files#diff-61744725fdd3172f6802244512c95dca65e7e70a722af0e99224d65d46759d3c)
4748
4849
The intent of this code was to load parts of our extension's plugin polyfill as early as possible. However, this had been implemented by manually compiling one of our source files and copying the output back into the content script. Not only was this code causing us to fail review, it was also very old. This was fixed by [implementing a proper build step for this](https://github.com/ruffle-rs/ruffle/pull/9588), ensuring that the code would no longer be obfuscated and also remain up to date.
@@ -63,7 +64,7 @@ Problem is, our extension submission relies on `sign-addon`, a deprecated Mozill
6364

6465
And [another](https://github.com/ruffle-rs/ruffle/pull/9982), and [another](https://github.com/ruffle-rs/ruffle/pull/10260), and [another](https://github.com/ruffle-rs/ruffle/pull/10276), and [another](https://github.com/ruffle-rs/ruffle/pull/10351). While I probably could have avoided some of these excess PRs with an A.M.O. test environment, or separate credentials for testing, I don't have a good test environment for GitHub Actions itself. And this is part of our normal nightly release workflow, which isn't idempotent and will fail if I run it more than once a day. We also can't stack submissions on A.M.O, so I'm stuck with a week-long edit-test-debug cycle.
6566

66-
This doesn't particularly *matter* since Ruffle users are getting updates again, but our first fully-automated submission with source code is 0.1.0.798 on March 24th.
67+
This doesn't particularly _matter_ since Ruffle users are getting updates again, but our first fully-automated submission with source code is 0.1.0.798 on March 24th.
6768

6869
After I submitted 0.1.0.760 a month ago, I suggested a weekly release cycle for Firefox in maintainer chat, based on Mozilla approving releases once every six days. So the last thing to do is to actually move Firefox to a separate weekly release workflow, so I don't have to manually turn it on and off every Friday. Furthermore, since it's a separate workflow that doesn't create Git tags, I can trigger it as many times as I like for debugging. 0.1.0.807 is submitted using the new process... but for some reason addons.mozilla.org times out and I have to upload manually.
6970

0 commit comments

Comments
 (0)