Repository navigation
Replace await-semaphore with async-mutex - #334
Merged
Merged
Conversation
Member
Author
|
I'll leave this in draft until MetaMask/eth-json-rpc-filters#33 is merged and published. Until we purge this package from our dependency tree entirely, the same TypeScript error we ran into might crop up again. Edit: This now depends upon #336 |
Gudahtt
force-pushed
the
replace-await-semaphore
branch
from
February 5, 2021 17:43
55a14c9 to
0ec62ea
Compare
Gudahtt
changed the base branch from
develop
to
update-eth-json-rpc-filters-lockfile
February 5, 2021 17:43
Base automatically changed from
update-eth-json-rpc-filters-lockfile
to
develop
February 5, 2021 18:52
Gudahtt
force-pushed
the
replace-await-semaphore
branch
from
February 5, 2021 18:53
0ec62ea to
edc5299
Compare
We've had issues with `await-semaphore` causing TypeScript errors due to mistakes in how it is packaged. It generally seems to be abandoned. `async-mutex` is more actively maintained, has better documentation and test coverage, and is API-compatible for our usage.
Gudahtt
force-pushed
the
replace-await-semaphore
branch
from
February 5, 2021 18:55
edc5299 to
40c9e38
Compare
Gudahtt
marked this pull request as ready for review
February 5, 2021 18:55
rekmarks
approved these changes
Feb 5, 2021
rickycodes
added a commit
that referenced
this pull request
Feb 18, 2021
…ba into feature/migrate-to-etherscan * 'feature/migrate-to-etherscan' of github.com:MetaMask/gaba: Update `sinon` and `@types/sinon` to latest versions (#352) Fix `tsconfig.json` indentation (#355) Replace `fetch-mock` with `nock` (#340) Update `ethereumjs-wallet` from v0.6.5 to v1.0.1 (#347) Add `babel-runtime` dependency required by `ethjs-query` (#341) Update `@metamask/eslint-config` from v3 to v4.1.0 (#344) Add `docs` to list of ignored eslint patterns (#345) Update `uuid` from `v3.3.3` to `v8.3.2` (#346) Update approval controller test import (#339) Add Dependabot config (#343) Update `typedoc` (#342) Remove unused test module (#338) Replace `await-semaphore` with `async-mutex` (#334) Update `eth-json-rpc-filters` in lockfile (#336)
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Update the package `@metamask/eth-json-rpc-provider` from v4 to v5. The breaking change in this release was to remove the `data` event from the provider, which is not used by this package. Changelog: https://github.com/MetaMask/core/blob/main/packages/eth-json-rpc-provider/CHANGELOG.md#500
amitabh94
pushed a commit
to amitabh94/core
that referenced
this pull request
Jun 16, 2026
* 10.0.1 * Update CHANGELOG.md --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com>
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#331, on MetaMask#333. Opts this package into the progressive test type checking rollout core is doing (16 of its 100 packages so far). ## Tests were not type checked at all Verified by injecting `const deliberateTypeError: number = "a string"` into a test file: | Check | Result | | --- | --- | | `yarn build` | passes, `tsconfig.build.json` excludes tests | | `yarn test:source` | passes, see below | | `yarn test:types` | passes, tsd only reads `*.test-d.ts` | | `yarn lint` | passes | `test:source` can never catch it: `isolatedModules` puts ts-jest on its `transpileModule` path, which erases types without checking them. ## The change ``` lint:tsc = tsc --noEmit --project tsconfig.lint.json ← added to `lint` ``` `tsconfig.lint.json` extends `tsconfig.json` (which already covers everything the build does not) and adds `skipLibCheck`, because dependency declarations do not satisfy the strict flags used here. ## Why `*.test-d.ts` is excluded Those belong to `tsd`, which checks them itself via `yarn test:types` (fixed in MetaMask#322). Including them here pulls `tsd`'s own types into the program, and those reach `type-fest`, whose `basic.d.ts` carries `/// <reference lib="esnext" />`. That silently widens built in types past this package's `lib`, producing a spurious failure where `FrozenSet` no longer satisfies `ReadonlySet` because of Set methods we do not target. Traced with `tsc --explainFiles`. ## Why this stacks on ES2022 With `lib: ES2020` a `tsc` pass over the tests reports **11 errors**, nearly all `Property 'cause' does not exist`. With `lib: ES2022`, **zero**. MetaMask#333 has to land first. ## Confirmed not vacuous A deliberate type error in a test file now exits non-zero with `TS2322`, and `tsd` still independently catches a bad `expectAssignable` in a `.test-d.ts` file. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Dev-only lint and TypeScript config changes; no runtime or shipped library behavior changes. > > **Overview** > **`yarn lint` now runs TypeScript on test and other non-build code** through a new `lint:tsc` script, closing a gap where `tsconfig.build.json` and transpile-only Jest never validated types in `*.test.ts` files. > > A new **`tsconfig.lint.json`** extends the root config with `skipLibCheck`, incremental **`emitDeclarationOnly`** output under **`.tsc-lint-cache/`** (gitignored and ignored by ESLint), and an **exclude** for **`*.test-d.ts`** so `tsd`-owned type tests are not double-checked or polluted by `tsd`’s wider `lib` types. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 670fa8aa1187a15a6935a75ea693271e6e4e1fb5. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've had issues with
await-semaphorecausing TypeScript errors due to mistakes in how it is packaged. It generally seems to be abandoned.async-mutexis more actively maintained, has better documentation and test coverage, and is API-compatible for our usage.