-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the JS pipeline #897
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just a small thing, we can mention the node version that should be used in the contributing file.
@Soare-Robert-Daniel Tested the PR and didn't find any issue ๐ |
๐ This PR is included in version 9.0.22 ๐ The release is available on GitHub release Your semantic-release bot ๐ฆ๐ |
Highlights
๐ Babel is on the latest version, modern features like
boo ?? foo
andboo?.name
can be used.๐ฎโโ๏ธ Eslint is on the latest version, and new warnings are now available to enforce best practices.
๐ง Format command has been added via Eslint
--fix
.๐ง New Github job added to check for lining and dev build posting.
๐ฅ DevTools now available via
inline-source-map
๐ฅ Webpack is on the latest version.
๐๏ธ SCSS lang now available
๐ฅ E2E Testing with Playwright for Free Version
Breakdown
The current state of the JS packages is unacceptable, especially the Babel version, which was very old, and many JS features needed to have the required support.
Upgrading the Babel version was a straight process; we removed some old packages and added new ones like
core-js
, which can provide polyfills for old browsers if needed.Vue was updated to its latest version of supported
2.X
. Related packages likevuex
andvue-loader
were also updated to the version that still supportsVue 2.X
-- in the future, it is recommended to migrate to Vue 3 and Pina store (since it is a new officially recommended store). SASS lang can now be used.After much refactoring to Webpack, the new version of Webpack has excellent features like
--mode
, which can easily control the build flow without the need for an env and additional lib likecross-env
.Also, the build result is now simplified. The old one created two types of files
build.js
andbuild.min.js
, which were coordinated by a PHP var namedROP_DEBUG
. Now, onlybuild.js
is created and loaded, and its content is determined by Webpack--mode
.โน๏ธ On the published version of ROP on WordPress, you will see that both
build.js
andbuild.min.js
were uploaded. Also, the build files were submitted via Git -- now theassets/js/build
is excluded via.gitignore
and the deploy job has been updated to run annpm run build
before uploading the the version to WordPress.DevTools are now in full force,
inline-source-map
is now available. Fixing bugs should now be a lot more easier.The E2E setup is similar to the one from Gutenberg which allows us to use their utility function to deal with WordPress internals.
Testing
This is a pretty big update and we need to make sure that we did not introduce any regression. Please check each feature in the interface to ensure the components works as expected.