Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8a2290f
Initial commit
Gudahtt Feb 8, 2023
504a752
Initial repository setup (#5)
Gudahtt Feb 9, 2023
315c9c0
Migrate both provider functions (#6)
Gudahtt Feb 10, 2023
123ccd5
Bump @metamask/eslint-config-jest from 11.0.0 to 11.1.0 (#1)
dependabot[bot] Feb 10, 2023
a4273cb
Bump @metamask/eslint-config from 11.0.2 to 11.1.0 (#2)
dependabot[bot] Feb 10, 2023
bece2c4
Bump @metamask/eslint-config-typescript from 11.0.2 to 11.1.0 (#3)
dependabot[bot] Feb 10, 2023
c9c6443
Bump @metamask/eslint-config-nodejs from 11.0.1 to 11.1.0 (#4)
dependabot[bot] Feb 10, 2023
5f652b1
Decrement version ahead of v1 release (#7)
Gudahtt Feb 10, 2023
328a43e
1.0.0 (#8)
github-actions[bot] Feb 10, 2023
c4eb3e3
deps: Switch from `json-rpc-engine` to `@metamask/json-rpc-engine` (#16)
legobeat Jul 20, 2023
06c41f6
1.0.1 (#18)
github-actions[bot] Jul 22, 2023
3cc4c88
Retract v1.0.1 (#18) (#19)
legobeat Jul 25, 2023
5d8309f
BREAKING: Update minimum Node.js version to 16 (#20)
legobeat Jul 26, 2023
d8c8315
Revert "BREAKING: Update minimum Node.js version to 16 (#20)" (#22)
legobeat Jul 27, 2023
9e24300
BREAKING: Update minimum Node.js version to 16 (#23)
legobeat Aug 2, 2023
de124c4
2.0.0 (#21)
github-actions[bot] Aug 22, 2023
b0cea6f
deps: @metamask/utils@^5.0.1->^8.1.0; bump @metamask/json-rpc-engine …
legobeat Sep 11, 2023
0aa45a9
2.1.0 (#26)
github-actions[bot] Sep 11, 2023
c624508
Decrement TypeScript to ~4.6.3 ahead of migration to core monorepo
MajorLift Sep 25, 2023
b691212
Update packages for eslint and prettier ahead of migration to core mo…
MajorLift Sep 25, 2023
f66efc9
linter fix from eslint version update
MajorLift Sep 25, 2023
c852c4f
Apply core monorepo eslint config
MajorLift Sep 25, 2023
3f97d73
Bump dependency versions to align with core monorepo v77.0.0
MajorLift Sep 25, 2023
3ad0c38
Bump TypeScript to v4.8.4 to align with planned version update in cor…
MajorLift Sep 26, 2023
919af45
Restore TypeScript compiler options that are not enabled in the core …
MajorLift Sep 26, 2023
6d23ef7
Merge remote-tracking branch 'eth-json-rpc-provider/230925-migrate-to…
MajorLift Sep 27, 2023
f998bf5
Merge branch 'main' into 230927-migrate-eth-json-rpc-provider
MajorLift Sep 28, 2023
db9598b
Align ESLint, Prettier packages and configs with core monorepo ahead …
MajorLift Sep 28, 2023
9ecb507
Add missing ISC license information (#24)
legobeat Sep 29, 2023
d3a9f01
2.2.0 (#29)
github-actions[bot] Sep 29, 2023
752cff9
Merge remote-tracking branch 'eth-json-rpc-provider/main' into 230927…
MajorLift Sep 29, 2023
d867315
Merge branch 'main' into 230927-migrate-eth-json-rpc-provider
MajorLift Sep 29, 2023
a78fa69
Merge branch 'main' into 230927-migrate-eth-json-rpc-provider
MajorLift Sep 30, 2023
fa8aa18
Merge branch 'main' into 230927-migrate-eth-json-rpc-provider
MajorLift Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions merged-packages/eth-json-rpc-provider/.depcheckrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignores": [
"@lavamoat/allow-scripts",
"@metamask/auto-changelog",
"@types/*",
"prettier-plugin-packagejson",
"ts-node",
"typedoc"
]
}
9 changes: 9 additions & 0 deletions merged-packages/eth-json-rpc-provider/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
135 changes: 135 additions & 0 deletions merged-packages/eth-json-rpc-provider/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
module.exports = {
root: true,
extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'],
ignorePatterns: [
'!.eslintrc.js',
'!jest.config.js',
'node_modules',
'dist',
'docs',
'coverage',
// 'merged-packages',
],
overrides: [
{
files: ['*.test.{ts,js}', '**/tests/**/*.{ts,js}'],
extends: ['@metamask/eslint-config-jest'],
rules: {
// TODO: Re-enable
'import/no-named-as-default-member': 'off',
'jest/no-conditional-expect': 'off',
},
},
{
// These files are test helpers, not tests. We still use the Jest ESLint
// config here to ensure that ESLint expects a test-like environment, but
// various rules meant just to apply to tests have been disabled.
files: ['**/tests/**/*.{ts,js}', '!*.test.{ts,js}'],
rules: {
'jest/no-export': 'off',
'jest/require-top-level-describe': 'off',
'jest/no-if': 'off',
'jest/no-test-return-statement': 'off',
// TODO: Re-enable this rule; we can accomodate this even in our test helpers
'jest/expect-expect': 'off',
},
},
{
files: ['*.js'],
parserOptions: {
sourceType: 'script',
ecmaVersion: '2018',
},
},
{
files: ['*.ts'],
extends: ['@metamask/eslint-config-typescript'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
rules: {
// disabled due to incompatibility with Record<string, unknown>
// See https://github.com/Microsoft/TypeScript/issues/15300#issuecomment-702872440
'@typescript-eslint/consistent-type-definitions': 'off',

// TODO: auto-fix breaks stuff
'@typescript-eslint/promise-function-async': 'off',

// TODO: re-enble most of these rules
'@typescript-eslint/await-thenable': 'warn',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-for-in-array': 'warn',
'@typescript-eslint/no-loss-of-precision': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/prefer-enum-initializers': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'no-restricted-syntax': 'off',
'no-restricted-globals': 'off',
},
},
{
files: ['tests/setupAfterEnv/matchers.ts'],
parserOptions: {
sourceType: 'script',
},
},
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/naming-convention': 'warn',
'import/unambiguous': 'off',
},
},
{
files: ['scripts/*.ts'],
rules: {
// All scripts will have shebangs.
'n/shebang': 'off',
},
},
],
rules: {
// Left disabled because various properties throughough this repo are snake_case because the
// names come from external sources or must comply with standards
// e.g. `txreceipt_status`, `signTypedData_v4`, `token_id`
camelcase: 'off',
'id-length': 'off',

// TODO: re-enble most of these rules
'@typescript-eslint/naming-convention': 'off',
'function-paren-newline': 'off',
'guard-for-in': 'off',
'id-denylist': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-anonymous-default-export': 'off',
'import/no-unassigned-import': 'off',
'lines-around-comment': 'off',
'n/no-sync': 'off',
'no-async-promise-executor': 'off',
'no-case-declarations': 'off',
'no-invalid-this': 'off',
'no-negated-condition': 'off',
'no-new': 'off',
'no-param-reassign': 'off',
'no-restricted-syntax': 'off',
radix: 'off',
'require-atomic-updates': 'off',
'jsdoc/match-description': [
'off',
{ matchDescription: '^[A-Z`\\d_][\\s\\S]*[.?!`>)}]$' },
],
},
settings: {
'import/resolver': {
typescript: {},
},
},
};
8 changes: 8 additions & 0 deletions merged-packages/eth-json-rpc-provider/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* text=auto

yarn.lock linguist-generated=false

# yarn v3
# See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
/.yarn/releases/** binary
/.yarn/plugins/** binary
4 changes: 4 additions & 0 deletions merged-packages/eth-json-rpc-provider/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

* @MetaMask/devs
15 changes: 15 additions & 0 deletions merged-packages/eth-json-rpc-provider/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '06:00'
allow:
- dependency-name: '@metamask/*'
target-branch: 'main'
versioning-strategy: 'increase-if-necessary'
open-pull-requests-limit: 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?

Are there any issues or other links reviewers should consult to understand this pull request better? For instance:

* Fixes #12345
* See: #67890
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build, Lint, and Test

on:
workflow_call:

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable

build:
name: Build
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn build
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

lint:
name: Lint
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn lint
- name: Validate RC changelog
if: ${{ startsWith(github.head_ref, 'release/') }}
run: yarn auto-changelog validate --rc
- name: Validate changelog
if: ${{ !startsWith(github.head_ref, 'release/') }}
run: yarn auto-changelog validate
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

test:
name: Test
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn test
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Release Pull Request

on:
workflow_dispatch:
inputs:
base-branch:
description: 'The base branch for git operations and the pull request.'
default: 'main'
required: true
release-type:
description: 'A SemVer version diff, i.e. major, minor, patch, prerelease etc. Mutually exclusive with "release-version".'
required: false
release-version:
description: 'A specific version to bump to. Mutually exclusive with "release-type".'
required: false

jobs:
create-release-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
# This is to guarantee that the most recent tag is fetched.
# This can be configured to a more reasonable value by consumers.
fetch-depth: 0
# We check out the specified branch, which will be used as the base
# branch for all git operations and the release PR.
ref: ${{ github.event.inputs.base-branch }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: MetaMask/action-create-release-pr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release-type: ${{ github.event.inputs.release-type }}
release-version: ${{ github.event.inputs.release-version }}
Loading