Skip to content

Update typescript v4.8 - #1718

Merged
Gudahtt merged 6 commits into
mainfrom
update-typescript-v4.8
Sep 27, 2023
Merged

Update typescript v4.8#1718
Gudahtt merged 6 commits into
mainfrom
update-typescript-v4.8

Conversation

@Gudahtt

Copy link
Copy Markdown
Member

Explanation

The typescript package has been updated to v4.8.4 to align with the module template. This was done to simplify the process of migrating libraries into the monorepo.

References

None

Changelog

N/A

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

@socket-security

socket-securityBot commented Sep 26, 2023

Copy link
Copy Markdown

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

PackagesVersionNew capabilitiesTransitivesSizePublisher
typescript4.6.4...4.8.4None+0/-068.8 MBtypescript-bot

@Gudahtt

This comment was marked as outdated.

Base automatically changed from update-typedoc to mainSeptember 26, 2023 12:32
@Gudahtt
Gudahttforce-pushed the update-typescript-v4.8 branch from 13543f4 to 4dbf4d4CompareSeptember 26, 2023 15:10
@GudahttGudahtt changed the title Update typescript v4.8 [WIP]Update typescript v4.8Sep 26, 2023
@Gudahtt
Gudahtt marked this pull request as ready for review September 26, 2023 15:11
@Gudahtt
Gudahtt requested review from a team as code ownersSeptember 26, 2023 15:11
@Gudahtt
Gudahttforce-pushed the update-typescript-v4.8 branch from 5dd75b1 to 951bd29CompareSeptember 26, 2023 15:51
Mrtenz
Mrtenz previously approved these changes Sep 26, 2023
MajorLift added a commit to MetaMask/eth-json-rpc-provider that referenced this pull request Sep 26, 2023

return { responseData };
} catch (error) {
assertIsError(error);

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

The update to v4.8.4 seems to have changed the effective type of this error variable for some reason. It was now triggering a lint error in a function that called this one, due to the @typescript-eslint/no-throw-literal rule (the error was typed as {}, as it was unknown and then we confirmed that it was not falsy).

We now ensure it's explicitly typed as an Error, as we would expect.

Comment threadpackages/name-controller/src/util.ts

@legobeatlegobeat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

The `typescript` package has been updated to v4.8.4 to align with the
module template. This was done to simplify the process of migrating
libraries into the monorepo.
@Gudahtt
Gudahttforce-pushed the update-typescript-v4.8 branch from 498d6db to 38ddf6aCompareSeptember 27, 2023 11:59
@Gudahtt
Gudahtt merged commit b3fffa7 into mainSep 27, 2023
@Gudahtt
Gudahtt deleted the update-typescript-v4.8 branch September 27, 2023 12:06
legobeat added a commit that referenced this pull request Oct 2, 2023
## Explanation
- Bump `@metamask/eslint-config*` packages to latest.
- Bump `typedoc`,`typedoc-plugin-missing-exports` to satisfy peerDeps
## References
#### Related
- #1730
- #1718 ## Changelog
## 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
---------
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
MajorLift added a commit that referenced this pull request 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/eth-json-rpc-provider@2.2.0
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/eth-json-rpc-provider@2.1.0
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/eth-json-rpc-provider@2.0.0
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/eth-json-rpc-provider@1.0.1
- [x]
https://github.com/MetaMask/core/releases/tag/@metamask/eth-json-rpc-provider@1.0.0
</details>
<details>
<summary>Verify that the tag diff links in CHANGELOG are
working</summary>
- [x] **WONTFIX**:
https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@2.2.0...HEAD
- [x]
https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@2.1.0...@metamask/eth-json-rpc-provider@2.2.0
- [x]
https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@2.0.0...@metamask/eth-json-rpc-provider@2.1.0
- [x]
https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@1.0.1...@metamask/eth-json-rpc-provider@2.0.0
- [x]
https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@1.0.0...@metamask/eth-json-rpc-provider@1.0.1
</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/eth-json-rpc-provider@2.2.0...HEAD
## 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 freeto 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

@Gudahtt@Mrtenz@legobeat