-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
refactor(loader): v5.0.0 #233
Conversation
- Updates code style to Prettier - Updates engines - Updates peerDependencies - Enforces commit message formatting - Migrates to CircleCI 2.0 - Removes deprecated React JSX support BREAKING CHANGE: Drops support for NodeJS 4.x BREAKING CHANGE: Drops support for Webpack 2.x
BREAKING CHANGE: Less Loader now enforces it's options & types, incorrect configurations with throw.
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.
Needs a test for ValidationError
(schema-utils
)
The test and README also needs standardization, but that are separate PR's I guess
@@ -0,0 +1,6 @@ | |||
# These are the default owners for everything in | |||
# webpack-contrib | |||
@webpack-contrib/org-maintainers |
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.
@jhnnns @webpack-contrib/org-maintainers
If he still actively wants to be pinged for review 😛
|
||
const render = pify(less.render.bind(less)); | ||
|
||
function lessLoader(source) { | ||
const loaderContext = this; | ||
const options = getOptions(loaderContext); | ||
validateOptions(schema, options, 'lessLoader'); |
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.
\nvalidateOptions(...)\n
&& lessLoader
=> Less Loader
@@ -42,7 +42,8 @@ function getFileExcerptIfPossible(lessErr) { | |||
* @param {Array<string>} lessErr.extract - e.g. [' .my-style {', ' .undefined-mixin;', ' display: block;'] | |||
* @returns {LessError} | |||
*/ | |||
function formatLessError(err) { /* eslint-disable no-param-reassign */ | |||
function formatLessError(err) { |
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.
class LessError extends Error {
super();
this.name = 'Syntax Error';
this.message = `${err.message}\n\n`;
// ...message formating
Error.captureStackTrace(this, this.constructor)
}
export default LessError;
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.
This maybe a separate PR aswell
@d3viant0ne I guess this has been superseded by #253? Anyway, thanks 👍 |
Compatibility issues
Commit message body
@jhnns - A note on the changes to the testing infrastructure. Non windows validation is now handled via CircleCI 2.0 on custom build containers.
The validation runs analysis & validations on the lowers common denominator ( maint LTS node + webpack latest ). If those to jobs pass, if will run the remaining validations in a
fan-out
configuration.End result is a 50% reduction in build feedback, complete control over our build / test environment & validation on
webpack@next
as well asnode@next
.There is a release task in the build setup as well that can be enabled at the request of the lib owner ( in this case you ).