Skip to content

Commit 8f4e858

Browse files
committed
Use babel for transpiling rather than closure compiler
We recently switch from using closure-compiler with `WHITESPACE_ONLY` to closure-compiler with `SIMPLE_OPTIMIZATIONS`. However this had the negative side effect that all input need to be free of closure compiler warnings, and this turned out not to be practical for all users. See #20810 for more on this When selecting a transpilation tool use I also evaluated `swx` (written in rust) and `esbuild` (written in go). `esbuild` was rejected because the simply don't support ES5 (evanw/esbuild#297). `swx` was rejected because it almost doubled the side of our `node_modules` directory by adding two 50mb binary files.
1 parent dabbde6 commit 8f4e858

File tree

9 files changed

+6285
-2548
lines changed

9 files changed

+6285
-2548
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[flake8]
22
ignore = E111,E114,E501,E261,E266,E121,E402,E241,W504,E741,B011,B023,U101
33
exclude =
4+
./node_modules/, # third-party code
45
./third_party/, # third-party code
56
./tools/filelock.py, # third-party code
67
./tools/scons/, # third-party code

ChangeLog.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,25 @@ See docs/process.md for more on how version tagging works.
2020

2121
3.1.51 (in development)
2222
-----------------------
23+
- Transpilation to support older environments/browsers is now performed by babel
24+
rather than closure compiler. This means that folks targeting older browsers
25+
(e.g. `-sLEGACY_VM_SUPPORT`) do not need to ensure their code is closure
26+
compliant. (#20879)
2327
- Breaking change: Using the `*glGetProcAddress()` family of functions now
2428
requires passing a linker flag -sGL_ENABLE_GET_PROC_ADDRESS. This prevents
2529
ports of native GL renderers from later accidentally attempting to activate
2630
"dormant" features if web browser implementations gain new WebGL extensions in
2731
the future, which `*glGetProcAddress()` is not able to support. (#20802)
28-
- Added Hi DPI support to GLFW. When enabled, GLFW automatically accounts for the
29-
`devicePixelRatio` browser property and changes the size of the canvas accordingly
30-
(including dynamically if the canvas is moved from a 4k screen to a 2k screen and
31-
vice-versa). `glfwGetFramebufferSize` now properly returns the canvas size in pixels,
32-
while `glfwGetWindowSize` returns the canvas size is screen size. By default,
33-
this feature is disabled. You can enable it before creating a window by calling
34-
`glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE)`. You can also
35-
dynamically change it after the window has been created by calling
36-
`glfwSetWindowAttrib(window, GLFW_SCALE_TO_MONITOR, GLFW_TRUE)`. (#20584)
32+
- Added Hi DPI support to GLFW. When enabled, GLFW automatically accounts for
33+
the `devicePixelRatio` browser property and changes the size of the canvas
34+
accordingly (including dynamically if the canvas is moved from a 4K screen to
35+
a 2K screen and vice-versa). `glfwGetFramebufferSize` now properly returns the
36+
canvas size in pixels, while `glfwGetWindowSize` returns the canvas size is
37+
screen size. By default, this feature is disabled. You can enable it before
38+
creating a window by calling `glfwWindowHint(GLFW_SCALE_TO_MONITOR,
39+
GLFW_TRUE)`. You can also dynamically change it after the window has been
40+
created by calling `glfwSetWindowAttrib(window, GLFW_SCALE_TO_MONITOR,
41+
GLFW_TRUE)`. (#20584)
3742

3843
3.1.50 - 11/29/23
3944
-----------------

0 commit comments

Comments
 (0)