Skip to content
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

Standardise repo per module template as of April 2023 #254

Merged
merged 8 commits into from
Apr 26, 2023

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Apr 24, 2023

This updates the repo to the latest standards. This includes a bump to the ESLint configurations, meaning I had to fix a bunch of ESLint-related errors.

Breaking changes

  • The minimum Node.js version is now 16.

@socket-security
Copy link

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
webextension-polyfill@0.10.0 None +0 addons-robot
prettier-plugin-packagejson@2.4.3 None +18 matzkoh
depcheck@1.4.3 filesystem +52 rumpl
ts-node@10.9.1 filesystem, shell, environment +15 cspotcode
jest-environment-jsdom@29.5.0 eval, environment +58 simenb
eslint-plugin-jsdoc@39.9.1 None +8 gajus
typedoc@0.23.28 network, filesystem, shell, environment +10 typedoc-bot
⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
@lavamoat/allow-scripts@2.3.0 2.0.3...2.3.0 None +30/-34 kumavis
@metamask/eslint-config-jest@11.1.0 7.0.0...11.1.0 None +67/-149 metamaskbot
@metamask/eslint-config-typescript@11.1.0 7.0.1...11.1.0 None +67/-143 metamaskbot
@types/pump@1.1.1 1.1.0...1.1.1 None +1/-1 types
typescript@4.8.4 4.3.5...4.8.4 None +0/-0 typescript-bot
jest-it-up@2.2.0 2.0.2...2.2.0 None +10/-10 rbardini
is-stream@2.0.1 2.0.0...2.0.1 None +0/-0 sindresorhus
@metamask/eslint-config-nodejs@11.1.0 7.0.1...11.1.0 None +68/-118 metamaskbot
@metamask/eslint-config@11.1.0 7.0.1...11.1.0 None +65/-116 metamaskbot
@types/readable-stream@2.3.15 2.3.9...2.3.15 None +1/-2 types
jest-chrome@0.7.2 0.7.1...0.7.2 None +153/-284 jacksteamdev
eth-rpc-errors@4.0.3 4.0.2...4.0.3 None +1/-1 rekmarks
eslint-config-prettier@8.8.0 8.3.0...8.8.0 None +0/-61 lydell
eslint-plugin-prettier@4.2.1 3.4.0...4.2.1 None +1/-62 jounqin
jest@28.1.3 26.6.3...28.1.3 eval +131/-281 simenb
eslint-plugin-import@2.27.5 2.23.4...2.27.5 None +52/-112 ljharb
detect-browser@5.3.0 5.2.0...5.3.0 None +0/-0 damonoehlman
ts-jest@28.0.8 26.5.6...28.0.8 eval +146/-283 kul
eslint-plugin-jest@27.2.1 23.18.0...27.2.1 None +0/-67 simenb
@types/jest@28.1.8 26.0.23...28.1.8 eval +25/-15 types
prettier@2.8.8 2.3.1...2.8.8 None +0/-0 prettier-bot
@types/chrome@0.0.233 0.0.136...0.0.233 None +2/-2 types
@types/node@17.0.45 14.14.14...17.0.45 None +0/-0 types

🚮 Removed packages: @typescript-eslint/eslint-plugin@4.28.1, @typescript-eslint/parser@4.28.1, eslint@7.29.0, eslint-plugin-json@2.0.1

@Mrtenz Mrtenz marked this pull request as ready for review April 24, 2023 15:55
@Mrtenz Mrtenz requested a review from a team as a code owner April 24, 2023 15:55
// after the provider has processed the request, to ensure that the
// provider recognizes the id.
setImmediate(() =>
setTimeout(() =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setImmediate is not available in recent versions of Node.js and/or browsers, so I've swapped this out to use setTimeout. For our purposes, it does effectively the same.

@@ -298,6 +308,7 @@ export class MetaMaskInpageProvider extends AbstractStreamProvider {
*/
send<T>(payload: SendSyncJsonRpcRequest): JsonRpcResponse<T>;

// eslint-disable-next-line @typescript-eslint/promise-function-async
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

send can return a Promise, so ESLint wants to add async to it. This changes the behaviour of the function, however, as anything would make it return a Promise. To avoid this we have to suppress this rule here.

@FrederikBolding FrederikBolding self-requested a review April 24, 2023 16:24
@FrederikBolding
Copy link
Member

Please document the breaking changes in this PR in the description.

tsconfig.json Show resolved Hide resolved
.github/workflows/publish-release.yml Show resolved Hide resolved
src/siteMetadata.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
src/StreamProvider.ts Outdated Show resolved Hide resolved
src/MetaMaskInpageProvider.test.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@Mrtenz Mrtenz force-pushed the mrtenz/standardise-april-2023 branch from 8048d34 to ba7f3a5 Compare April 25, 2023 09:48
@Mrtenz Mrtenz requested a review from Gudahtt April 25, 2023 09:55
@Mrtenz Mrtenz merged commit f216175 into main Apr 26, 2023
@Mrtenz Mrtenz deleted the mrtenz/standardise-april-2023 branch April 26, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants