Remove babel-plugin-transform-es2015-modules-commonjs, which is 6 years out-of-date and no longer supported. It generates security warnings in the console, because of outdated dependencies on babel-traverse (also 6 years out-of-date and not supported in Babel 7.)
use Babel to transpile .coffee and .cjsx files from CJS to ESM.
explicitly set the Babel source type to ESM, which has been the default for a while now. All of PFE’s JS and JSX files use ESM.
fix broken module.exports in a couple of places.
fix broken propTypes in Pages Editor components.
npm audit fix.
fixes #7115.
fixes #7116.
fixes some missing React keys in the app router.
You can test this locally a couple of ways:
npm start: development React build with hot module reloading and React debugging errors in the console.
npm run serve-static: build the production bundle with Webpack, and serve it on http://localhost:3735 or http://local.zooniverse.org:3735. This method reproduces a production deploy, but without the nginx reverse proxy.
npm audit and npm ci should show 0 problems, with the changes here.
Required Manual Testing
[ ] Does the non-logged in home page render correctly?
[ ] Does the logged in home page render correctly?
[ ] Does the projects page render correctly?
[ ] Can you load project home pages?
[ ] Can you load the classification page?
[ ] Can you submit a classification?
[ ] Does talk load correctly?
[ ] Can you post a talk comment?
Review Checklist
[ ] Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
[ ] Does it work on mobile?
[ ] Can you npm ci and app works as expected?
[ ] If the component is in coffeescript, is it converted to ES6? Is it free of eslint errors? Is the conversion its own commit?
[ ] Are the tests passing locally and on GitHub Actions?
Optional
[ ] Have you replaced any ChangeListener or PromiseRenderer components with code that updates component state?
[ ] If changes are made to the classifier, does the dev classifier still work?
coverage: 57.247% (+0.3%) from 56.991%
when pulling 354fd0f186625b0470f38e88d3c71cf3e954ce24 on eatyourgreens:remove-babel-cjs-plugin
into 78699da2a1e70781887dfb44c892ee1bb7ecc8fa on zooniverse:master.
Remove
babel-plugin-transform-es2015-modules-commonjs
, which is 6 years out-of-date and no longer supported. It generates security warnings in the console, because of outdated dependencies onbabel-traverse
(also 6 years out-of-date and not supported in Babel 7.).coffee
and.cjsx
files from CJS to ESM.module.exports
in a couple of places.propTypes
in Pages Editor components.npm audit fix
.You can test this locally a couple of ways:
npm start
: development React build with hot module reloading and React debugging errors in the console.npm run serve-static
: build the production bundle with Webpack, and serve it onhttp://localhost:3735
orhttp://local.zooniverse.org:3735
. This method reproduces a production deploy, but without the nginx reverse proxy.npm audit
andnpm ci
should show 0 problems, with the changes here.Required Manual Testing
Review Checklist
npm ci
and app works as expected?Optional
ChangeListener
orPromiseRenderer
components with code that updates component state?