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

Migrate @metamask/eth-json-rpc-provider to core monorepo #1685

Closed
mikesposito opened this issue Sep 18, 2023 · 1 comment
Closed

Migrate @metamask/eth-json-rpc-provider to core monorepo #1685

mikesposito opened this issue Sep 18, 2023 · 1 comment
Assignees

Comments

@mikesposito
Copy link
Member

As part of Shared Libraries Q3 OKRs, the team would like to migrate @metamask/eth-json-rpc-provider libraries into this monorepo to make it easier to maintain.

See #1079 comment for instructions on accomplishing this.

@xinnanyemm
Copy link

@MajorLift MajorLift self-assigned this Sep 28, 2023
MajorLift added a commit that referenced this issue Oct 5, 2023
…epo. (#1766)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 3. Align dependencies with monorepo.
- [x] Remove redundant dependencies that are already listed in the root
package.json.
- [x] Bump remaining dependency versions so that they align with other
non-root packages.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 5, 2023
…s.pro` for ISC license. (#1767)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 4. Add exception for non-MIT license.
- [x] If migration target uses a non-MIT license, add exception entries
in the root `constraints.pro` file.
- [x] Make sure the new rule doesn't break any of the existing
package.json files by running `yarn constraints`.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 5, 2023
…rectories. (#1764)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 1. Remove files and directories that will be replaced by
corresponding files in the monorepo root.
- [x] **Remove**: `.github/`, `.git*`, `scripts/`, `.depcheckrc.json`,
`.yarn/`, `.yarnrc.yml`, `yarn.lock`, `.editorconfig`, `.eslint*`,
`.prettier*`, `.nvm*`.
- [x] **Keep**: `src/`, `tests/`, `CHANGELOG.md`, `LICENSE`,
`package.json`, `README.md`, `jest.config.js`, `tsconfig*.json`,
`typedoc.json`.

***

See #1551 (comment)
for an outline of the entire process.

## Blocked by
- [x] #1790

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 5, 2023
…ig files. (#1765)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 2. Replace config files.
- [x] Update `tsconfig*.json`, `typedoc.json`, `jest.config.js` to
extend from corresponding files in root. Copy contents of corresponding
files in other non-root packages.
  - [x] Keep TypeScript compiler flags. 
- [x] Add tsconfig reference paths for non-root packages that are
upstream dependencies of the migration target.
  - [x] Keep Jest coverage threshold values. 
  - [x] Add `deepmerge` as a devDependency.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 11, 2023
…rectories. (#1764)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 1. Remove files and directories that will be replaced by
corresponding files in the monorepo root.
- [x] **Remove**: `.github/`, `.git*`, `scripts/`, `.depcheckrc.json`,
`.yarn/`, `.yarnrc.yml`, `yarn.lock`, `.editorconfig`, `.eslint*`,
`.prettier*`, `.nvm*`.
- [x] **Keep**: `src/`, `tests/`, `CHANGELOG.md`, `LICENSE`,
`package.json`, `README.md`, `jest.config.js`, `tsconfig*.json`,
`typedoc.json`.

***

See #1551 (comment)
for an outline of the entire process.

## Blocked by
- [x] #1790

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 12, 2023
…epo. (#1766)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 3. Align dependencies with monorepo.
- [x] Remove redundant dependencies that are already listed in the root
package.json.
- [x] Bump remaining dependency versions so that they align with other
non-root packages.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 12, 2023
…s.pro` for ISC license. (#1767)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 4. Add exception for non-MIT license.
- [x] If migration target uses a non-MIT license, add exception entries
in the root `constraints.pro` file.
- [x] Make sure the new rule doesn't break any of the existing
package.json files by running `yarn constraints`.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 12, 2023
…rectories. (#1764)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 1. Remove files and directories that will be replaced by
corresponding files in the monorepo root.
- [x] **Remove**: `.github/`, `.git*`, `scripts/`, `.depcheckrc.json`,
`.yarn/`, `.yarnrc.yml`, `yarn.lock`, `.editorconfig`, `.eslint*`,
`.prettier*`, `.nvm*`.
- [x] **Keep**: `src/`, `tests/`, `CHANGELOG.md`, `LICENSE`,
`package.json`, `README.md`, `jest.config.js`, `tsconfig*.json`,
`typedoc.json`.

***

See #1551 (comment)
for an outline of the entire process.

## Blocked by
- [x] #1790

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 12, 2023
…ig files. (#1765)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 2. Replace config files.
- [x] Update `tsconfig*.json`, `typedoc.json`, `jest.config.js` to
extend from corresponding files in root. Copy contents of corresponding
files in other non-root packages.
  - [x] Keep TypeScript compiler flags. 
- [x] Add tsconfig reference paths for non-root packages that are
upstream dependencies of the migration target.
  - [x] Keep Jest coverage threshold values. 
  - [x] Add `deepmerge` as a devDependency.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
MajorLift added a commit that referenced this issue Oct 13, 2023
## Explanation

This PR implements the following incremental steps in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging from `merged-packages/`

#### 5. Port tags 
  - See: #1800
  
<details>  
  <summary>Push ported tags to core repo</summary>
  
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]
</details>

<details>
<summary>Verify that the tag diff links in CHANGELOG are
working</summary>
  
- [x] **WONTFIX**:
https://github.com/MetaMask/core/compare/@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
- [x]
https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
</details>

### Phase C: Integration into `packages/`

#### 1. The big leap
- [x] **Move migration target from `migrated-packages/` to
`packages/`.**
- [x] Run `yarn install` in the root directory.
- [x] Check that all tests are passing in migration target by running
`yarn workspace @metamask/<package-name> test`.

#### 2. Update downstream repos
- [x] Add tsconfig reference paths for migration target in downstream
packages and root.
- [x] Bump migration target version in downstream packages and root.

#### 3. Linter fixes
- [x] Apply yarn constraints fixes to migration target package.json
file: `yarn constraints --fix` (run twice).
- [x] Identify validator fixes for CHANGELOG using `yarn workspace
@metamask/<package-name> changelog:validate` and apply the diffs.

#### 4. Resolve downstream errors
- [x] #1653
  - If introducing the migration target breaks any downstream repos:
    - [x] Resolve simple errors
- [x] Mark and ignore complex errors using `@ts-expect-error TODO:`
annotations.
- [x] Create a separate issue for resolving the marked errors as soon as
the migration is completed.

#### 5. Finalize merge
- [x] Check that all tests are passing in all subpackages of core and
CI.
- [x] Merge `packages/<package-name>` directory into core main branch.

***

See #1551 (comment)
for an outline of the entire process.

## Next Steps

- The next PR(s) will implement the final steps of the migration process
(D-1 in the migration checklist).

## Blocked by
- Dependencies:
  - [x] typescript bump: #1718
- [x] `@metamask/utils` bump: #1639
- Downstream type errors:
  - [x] #1653
- [ ] MetaMask/eth-json-rpc-provider#14
(ignored)
  - [ ] MetaMask/utils#140 (ignored)
- Tag porting:
  - [x] #1802
- [x] "Unreleased" tag diff link shows entire history of core:
https://github.com/MetaMask/core/compare/@metamask/[email protected]

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

<!--
If you're making any consumer-facing changes, list those changes here as
if you were updating a changelog, using the template below as a guide.

(CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or
FIXED. For security-related issues, follow the Security Advisory
process.)

Please take care to name the exact pieces of the API you've added or
changed (e.g. types, interfaces, functions, or methods).

If there are any breaking changes, make sure to offer a solution for
consumers to follow once they upgrade to the changes.

Finally, if you're only making changes to development scripts or tests,
you may replace the template below with "None".
-->

### `@metamask/eth-json-rpc-provider`

- **ADDED**: Migrated into the core monorepo.

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants