README.md 1.37 KB
Newer Older
Philip Chimento's avatar
Philip Chimento committed
1 2
🛠 mozjs-deprecation-tools 🛠
=============================
Philip Chimento's avatar
Philip Chimento committed
3

Philip Chimento's avatar
Philip Chimento committed
4 5 6
This is a set of tools for checking your JS source code when you upgrade
to the next extended-support release (ESR) of SpiderMonkey, to see if
you are using any Mozilla-specific extensions that will be removed.
Philip Chimento's avatar
Philip Chimento committed
7

Philip Chimento's avatar
Philip Chimento committed
8 9 10 11
- Upgrading from ESR 52 to ESR 60? Use `moz60tool`.
- Upgrading from ESR 60 to ESR 68? Use `moz68tool`.

To run it (replace `moz60tool` with whichever one you are using):
Philip Chimento's avatar
Philip Chimento committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25
```
./moz60tool myfile.js
```

There are no command line arguments and it only processes one file.
However, if you want to batch-process files you can use `find`:
```
find /path/to/mycode -name '*.js' -exec ./moz60tool {} \;
```

The tool is only intended to be used once, at the time when you migrate
your codebase.
It's not meant for use in CI pipelines.

Philip Chimento's avatar
Philip Chimento committed
26 27 28 29 30 31 32
Oh no, my distro has already upgraded to GJS with the new SpiderMonkey
----------------------------------------------------------------------
As a workaround, it _should_ work to run the tool with the JS
development shell binary which is probably shipped with the devel
package from the previous SpiderMonkey ESR.
In the case of `moz60tool`, that would be the `js52` binary shipped with
whatever your distro's equivalent of `mozjs52-devel` is.
Philip Chimento's avatar
Philip Chimento committed
33 34 35 36 37 38 39 40
```
js52 ./moz60tool myfile.js
```

Maintenance Status
------------------
No maintenance intended, but if you submit a merge request I will look
at it.