Skip to content

Conversation

@MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Sep 27, 2023

Explanation

This is the first of two PRs that will migrate eth-json-rpc-provider into the core monorepo by following these steps: #1079 (comment).

  • This PR focuses on migrating the git history of the original package.
    • eth-json-rpc-provider is moved into a temporary directory in core (merged-packages/) with git history fully intact.
    • This PR will be merged without squashing to preserve the git history.
  • The second PR will remove the merged-packages/ directory and integrate eth-json-rpc-provider into the packages/ directory, resolving any issues arising from applying core monorepo linter/compiler/build settings to the newly added package.

Blocked by

References

Changelog

N/A since @metamask/eth-json-rpc-provider isn't usable from the monorepo as of this PR.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

Gudahtt and others added 25 commits February 8, 2023 18:30
The package manifest, README, and PR template have been updated.
* Migrate both provider functions

The functions `providerFromEngine` and `providerFromMiddleware` have
been migrated from `@metamask/eth-json-rpc-middleware`.

The `SafeEventEmitterProvider` is now a class with its own separate
module, rather than a type. Hopefully this will help prevent future
type errors. The error in the `SafeEventEmitterProvider` type in
`@metamask/eth-json-rpc-middleware` has been corrected; the response in
in the callback is now optional.

Everything should be fully documented and tested.

* Export type

* Fix spelling mistake

Co-authored-by: Alex Donesky <[email protected]>

* Improve test names

---------

Co-authored-by: Alex Donesky <[email protected]>
Bumps [@metamask/eslint-config-jest](https://github.com/MetaMask/eslint-config) from 11.0.0 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.0...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config-jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@metamask/eslint-config](https://github.com/MetaMask/eslint-config) from 11.0.2 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.2...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Stacey <[email protected]>
Bumps [@metamask/eslint-config-typescript](https://github.com/MetaMask/eslint-config) from 11.0.2 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.2...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Stacey <[email protected]>
Bumps [@metamask/eslint-config-nodejs](https://github.com/MetaMask/eslint-config) from 11.0.1 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.1...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config-nodejs"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Stacey <[email protected]>
The version has been changed to v0.0.1 so that the first release can be
v1. I set this to v1 forgetting that our release automation would also
attempt to set this.
* 1.0.0

* Update changelog

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Mark Stacey <[email protected]>
* deps: @metamask/safe-event-emitter@^2.0.0->^3.0.0
* deps: migrate from json-rpc-engine to @metamask/json-rpc-engine

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: legobt <[email protected]>
v1.0.1 contains two changes that should have been considered
semver-major:

- Type-interface incompatability with previous version (MetaMask/json-rpc-engine#139)
- Introduced dependency `@metamask/json-rpc-engine` indicates a minimum
  supported Node.js version of 16. This prevents the module from
  installing on some package manager configurations, like default
  yarn classic.

This will be re-released as v2.0.0.
Required by update of `@metamask/json-rpc-engine` (#16)
Required by update of `@metamask/json-rpc-engine` (#16)

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: legobt <[email protected]>
…25)

* deps: @metamask/utils@^5.0.1->^8.1.0
* deps: @metamask/json-rpc-engine@^7.0.0->^7.1.0
* deps: @metamask/utils@^7.1.0->^8.1.0
---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: legobt <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: Maarten Zuidhoorn <[email protected]>
- match compiler options with core monorepo
  - passes all tests

Closes #1682
…norepo

- added: `eslint-plugin-promise`
- removed: `eslint-plugin-node`

See: #1683
- added `eslint-import-resolver-typescript` v2.5.0 as dependency

See: #1683
@socket-security
Copy link

socket-security bot commented Sep 27, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/auto-changelog 3.1.0 None +0 166 kB metamaskbot
eslint-config-prettier 8.5.0 None +9 1.21 MB lydell
jest 28.1.3 None +122 14.1 MB simenb
ts-jest 28.0.8 None +123 14.3 MB kul
@types/jest 28.1.8 eval +26 2.84 MB types
prettier-plugin-packagejson 2.4.5 None +4 15.9 MB matzkoh
@types/node 17.0.23 None +0 1.68 MB types
depcheck 1.4.3 filesystem +54 17.4 MB rumpl
prettier 2.7.1 None +0 15.8 MB prettier-bot
typedoc 0.23.28 network +7 11.3 MB typedoc-bot
eslint-plugin-jest 27.1.5 None +16 2.96 MB simenb

@socket-security
Copy link

socket-security bot commented Sep 27, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: [email protected], @babel/[email protected], @lavamoat/[email protected], [email protected], [email protected], [email protected]

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

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 [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

…-monorepo-deps-linter-configs' into 230927-migrate-eth-json-rpc-provider
@MajorLift MajorLift force-pushed the 230927-migrate-eth-json-rpc-provider branch from e22f806 to 6d23ef7 Compare September 27, 2023 17:42
@MajorLift MajorLift changed the title Migrate eth-json-rpc-provider into core monorepo Migrate eth-json-rpc-provider into core monorepo (1/2) Sep 27, 2023
@MajorLift MajorLift self-assigned this Sep 27, 2023
@MajorLift MajorLift added enhancement New feature or request team-wallet-framework Deprecated: Please use `team-core-platform` instead. labels Sep 27, 2023
@MajorLift MajorLift linked an issue Sep 27, 2023 that may be closed by this pull request
MajorLift and others added 3 commits September 28, 2023 07:52
…of migration (#28)

## Description
- This PR aligns the ESLint and Prettier packages and configs in this repo with the core monorepo.
- This is a preparation step for migrating the `eth-json-rpc-provider` package into the core monorepo.
- Originally, the plan was to decrement the TypeScript version to align with the core monorepo, but following [this discussion](MetaMask/eth-json-rpc-provider#27), we've opted to use TypeScript version v4.8.4, and preserve the compiler options in this package that aren't enabled in the core monorepo.

## References
- See #1551
- Closes #1683
- Closes #1682 (is superseded by this PR)
@MajorLift MajorLift marked this pull request as draft September 29, 2023 18:04
github-actions bot and others added 2 commits September 29, 2023 13:11
* 2.2.0

* Update CHANGELOG.md

* Add license update as entry to CHANGELOG.md

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Jongsun Suh <[email protected]>
@MajorLift MajorLift force-pushed the 230927-migrate-eth-json-rpc-provider branch from d685226 to 752cff9 Compare September 29, 2023 20:15
@MajorLift MajorLift marked this pull request as ready for review September 29, 2023 20:25
Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

LGTM!

@MajorLift MajorLift merged commit 10b8f26 into main Oct 2, 2023
@MajorLift MajorLift deleted the 230927-migrate-eth-json-rpc-provider branch October 2, 2023 14:55
MajorLift added a commit that referenced this pull request Oct 2, 2023
MajorLift added a commit that referenced this pull request Oct 2, 2023
)

Reverts #1737

- The intention for this PR was to preserve the full git history of the
original repo, which means the commits shouldn't have been squashed
while merging.
- #1737 will be re-merged using the `--no-ff` option, which will be
temporarily enabled by admin.
@MajorLift MajorLift restored the 230927-migrate-eth-json-rpc-provider branch October 2, 2023 15:21
MajorLift added a commit that referenced this pull request Oct 11, 2023
)

Reverts #1737

- The intention for this PR was to preserve the full git history of the
original repo, which means the commits shouldn't have been squashed
while merging.
- #1737 will be re-merged using the `--no-ff` option, which will be
temporarily enabled by admin.
MajorLift added a commit that referenced this pull request Oct 11, 2023
)

Reverts #1737

- The intention for this PR was to preserve the full git history of the
original repo, which means the commits shouldn't have been squashed
while merging.
- #1737 will be re-merged using the `--no-ff` option, which will be
temporarily enabled by admin.
MajorLift added a commit that referenced this pull request Oct 12, 2023
)

Reverts #1737

- The intention for this PR was to preserve the full git history of the
original repo, which means the commits shouldn't have been squashed
while merging.
- #1737 will be re-merged using the `--no-ff` option, which will be
temporarily enabled by admin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request team-wallet-framework Deprecated: Please use `team-core-platform` instead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants