-
Notifications
You must be signed in to change notification settings - Fork 340
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
chore: migrate more to ESM #5298
Conversation
📊 Benchmark resultsComparing with e65f97c Package size: 254 MB(no change)
Legend
|
0ae4a17
to
220bd13
Compare
@@ -357,7 +357,6 @@ | |||
"serialize-javascript": "^6.0.0", | |||
"sinon": "^14.0.0", | |||
"strip-ansi": "^6.0.0", | |||
"supertest": "^6.1.6", |
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.
was only used in one test, instead I now used simply got
to do the query.
}) | ||
|
||
t.is(ntlFunction.url, functionUrl) | ||
}) |
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.
moved to a unit test
} | ||
} | ||
} | ||
} |
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.
Removed retry logic as it was only introduced to fix tests. If this is still a problem, we need to mock this file.
We probably should mock this anyway, as tests should not write global config file.
} | ||
|
||
// Memoise config result so that we only load it once | ||
module.exports = memoizeOne(getGlobalConfig) |
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.
memoizeOne
removed as it was completely unneccessary. We never call getGlobalConfig()
with any arguments so it would anyway only cache it once.
@@ -305,7 +303,6 @@ | |||
"netlify-redirector": "^0.3.1", | |||
"node-fetch": "^2.6.0", | |||
"node-version-alias": "^1.0.1", | |||
"omit.js": "^2.0.2", |
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.
Used destructuring instead of omit.js
-x = omit(config.build, ['publish', 'publishOrigin']) }
+// eslint-disable-next-line no-unused-vars
+const { publish, publishOrigin, ...x } = config.build
We are getting close
I know this is huge, but it will soon be done.