Skip to content

Commit bf2e6bf

Browse files
committed
Merge branch 'main' into rekm/eth-json-rpc-middleware-finalize-migration
2 parents f625694 + b8756fc commit bf2e6bf

33 files changed

+138
-55
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484

8585
## Joint team ownership
8686
/packages/core-backend @MetaMask/core-platform @MetaMask/metamask-assets
87+
/packages/eth-block-tracker @MetaMask/wallet-integrations @MetaMask/core-platform
8788
/packages/eth-json-rpc-middleware/src/methods @MetaMask/confirmations @MetaMask/wallet-api-platform-engineers
8889
/packages/eth-json-rpc-middleware/src/wallet.* @MetaMask/confirmations @MetaMask/wallet-api-platform-engineers
8990
/packages/eth-json-rpc-provider @MetaMask/wallet-integrations @MetaMask/core-platform

eslint-warning-thresholds.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,5 +493,39 @@
493493
},
494494
"tests/setupAfterEnv/nock.ts": {
495495
"import-x/no-named-as-default-member": 3
496+
},
497+
"packages/eth-block-tracker/src/BlockTracker.ts": {
498+
"@typescript-eslint/naming-convention": 1
499+
},
500+
"packages/eth-block-tracker/src/PollingBlockTracker.test.ts": {
501+
"@typescript-eslint/explicit-function-return-type": 12,
502+
"@typescript-eslint/naming-convention": 1
503+
},
504+
"packages/eth-block-tracker/src/PollingBlockTracker.ts": {
505+
"@typescript-eslint/explicit-function-return-type": 14,
506+
"@typescript-eslint/naming-convention": 1,
507+
"@typescript-eslint/unbound-method": 5
508+
},
509+
"packages/eth-block-tracker/tests/buildDeferred.ts": {
510+
"@typescript-eslint/explicit-function-return-type": 1,
511+
"@typescript-eslint/naming-convention": 1
512+
},
513+
"packages/eth-block-tracker/tests/emptyFunction.ts": {
514+
"@typescript-eslint/explicit-function-return-type": 1
515+
},
516+
"packages/eth-block-tracker/tests/recordCallsToSetTimeout.ts": {
517+
"@typescript-eslint/explicit-function-return-type": 4,
518+
"@typescript-eslint/naming-convention": 2,
519+
"@typescript-eslint/no-explicit-any": 1
520+
},
521+
"packages/eth-block-tracker/tests/setupAfterEnv.ts": {
522+
"@typescript-eslint/consistent-type-definitions": 1,
523+
"@typescript-eslint/explicit-function-return-type": 2,
524+
"@typescript-eslint/naming-convention": 1,
525+
"@typescript-eslint/no-explicit-any": 3
526+
},
527+
"packages/eth-block-tracker/tests/withBlockTracker.ts": {
528+
"@typescript-eslint/explicit-function-return-type": 2,
529+
"@typescript-eslint/no-explicit-any": 1
496530
}
497531
}

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,20 @@ const config = createConfig([
251251
'n/no-deprecated-api': 'off',
252252
},
253253
},
254+
{
255+
files: ['packages/eth-block-tracker/**/*.ts'],
256+
rules: {
257+
// TODO: These should perhaps be enabled
258+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
259+
'no-restricted-syntax': 'off',
260+
// TODO: These should definitely be enabled
261+
'@typescript-eslint/naming-convention': 'warn',
262+
'@typescript-eslint/no-explicit-any': 'warn',
263+
'@typescript-eslint/unbound-method': 'warn',
264+
'@typescript-eslint/consistent-type-definitions': 'warn',
265+
'@typescript-eslint/explicit-function-return-type': 'warn',
266+
},
267+
},
254268
]);
255269

256270
export default config;

merged-packages/eth-block-tracker/tsconfig.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"@metamask/eslint-config-jest": "^14.0.0",
6161
"@metamask/eslint-config-nodejs": "^14.0.0",
6262
"@metamask/eslint-config-typescript": "^14.0.0",
63-
"@metamask/eth-block-tracker": "^12.2.1",
63+
"@metamask/eth-block-tracker": "^13.0.0",
6464
"@metamask/eth-json-rpc-provider": "^5.0.1",
6565
"@metamask/json-rpc-engine": "^10.1.1",
6666
"@metamask/utils": "^11.8.1",

merged-packages/eth-block-tracker/CHANGELOG.md renamed to packages/eth-block-tracker/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **BREAKING:** Update minimum Node.js version from `^18.16.0` to `^18.18.0` ([#7930](https://github.com/MetaMask/core/pull/7930))
1013
- This package was migrated from `MetaMask/eth-block-tracker` to the
11-
`MetaMask/core` monorepo.
14+
`MetaMask/core` monorepo ([#7930](https://github.com/MetaMask/core/pull/7930))
1215
- See [`MetaMask/eth-block-tracker`](https://github.com/MetaMask/eth-block-tracker/blob/main/CHANGELOG.md)
1316
for the original changelog.
1417

File renamed without changes.
File renamed without changes.

merged-packages/eth-block-tracker/package.json renamed to packages/eth-block-tracker/package.json

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "@metamask/eth-block-tracker",
33
"version": "13.0.0",
44
"description": "A block tracker for the Ethereum blockchain. Keeps track of the latest block",
5-
"homepage": "https://github.com/MetaMask/eth-block-tracker#readme",
5+
"keywords": [
6+
"MetaMask",
7+
"Ethereum"
8+
],
9+
"homepage": "https://github.com/MetaMask/core/tree/main/packages/eth-block-tracker#readme",
610
"bugs": {
7-
"url": "https://github.com/MetaMask/eth-block-tracker/issues"
11+
"url": "https://github.com/MetaMask/core/issues"
812
},
913
"repository": {
1014
"type": "git",
@@ -29,23 +33,25 @@
2933
"module": "./dist/index.mjs",
3034
"types": "./dist/index.d.cts",
3135
"files": [
32-
"dist"
36+
"dist",
37+
"dist/"
3338
],
3439
"scripts": {
35-
"build": "ts-bridge --project tsconfig.build.json --clean",
36-
"build:clean": "rimraf dist && yarn build",
40+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
3741
"build:docs": "typedoc",
38-
"lint": "yarn lint:eslint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog",
39-
"lint:changelog": "auto-changelog validate --prettier",
40-
"lint:constraints": "yarn constraints",
41-
"lint:dependencies": "depcheck && yarn dedupe --check",
42-
"lint:dependencies:fix": "depcheck && yarn dedupe",
43-
"lint:eslint": "eslint . --cache",
44-
"lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies:fix && yarn lint:changelog",
45-
"lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
46-
"prepack": "./scripts/prepack.sh",
47-
"test": "jest && attw --pack",
48-
"test:watch": "jest --watch"
42+
"changelog:update": "../../scripts/update-changelog.sh @metamask/eth-block-tracker",
43+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/eth-block-tracker",
44+
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies",
45+
"lint:dependencies": "depcheck",
46+
"lint:eslint": "eslint . --cache --ext js,ts",
47+
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn lint:dependencies",
48+
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
49+
"publish:preview": "yarn npm publish --tag preview",
50+
"since-latest-release": "../../scripts/since-latest-release.sh",
51+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
52+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
53+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
54+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
4955
},
5056
"dependencies": {
5157
"@metamask/eth-json-rpc-provider": "^5.0.1",
@@ -65,18 +71,11 @@
6571
"typedoc-plugin-missing-exports": "^2.0.0",
6672
"typescript": "~5.2.2"
6773
},
68-
"packageManager": "yarn@4.5.3",
6974
"engines": {
70-
"node": "^18.16 || ^20 || >=22"
75+
"node": "^18.18 || >=20"
7176
},
7277
"publishConfig": {
7378
"access": "public",
7479
"registry": "https://registry.npmjs.org/"
75-
},
76-
"lavamoat": {
77-
"allowScripts": {
78-
"@lavamoat/preinstall-always-fail": false,
79-
"eslint-plugin-import-x>unrs-resolver": false
80-
}
8180
}
8281
}

0 commit comments

Comments
 (0)