Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 719482b

Browse files
Revert "Add eth2 github action (#3892)" (#3895)
This reverts commit 1a252a9.
1 parent 1a252a9 commit 719482b

20 files changed

+5778
-15083
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,29 +110,3 @@ jobs:
110110
node-version: 12
111111
- uses: actions/checkout@v2
112112
- run: bash ./scripts/ci.sh
113-
eth2:
114-
runs-on: ubuntu-latest
115-
strategy:
116-
matrix:
117-
node: [10, 11, 12, 13]
118-
env:
119-
TEST: "eth2"
120-
steps:
121-
- uses: actions/setup-node@v1
122-
with:
123-
node-version: ${{ matrix.node }}
124-
125-
- uses: actions/checkout@v2
126-
127-
- uses: actions/cache@v2
128-
id: cache-deps
129-
with:
130-
path: |
131-
node_modules
132-
*/*/node_modules
133-
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
134-
135-
- run: npm ci
136-
if: steps.cache-deps.outputs.cache-hit != 'true'
137-
138-
- run: bash ./scripts/ci.sh

CHANGELOG.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ Released with 1.0.0-beta.37 code base.
321321

322322
- Update `dist` to latest release (`1.3.2`) (#3875)
323323

324+
## [Unreleased]
325+
324326
## [1.3.4]
325327

326328
### Changed
@@ -348,15 +350,3 @@ Released with 1.0.0-beta.37 code base.
348350
- Add `ETH2Core` class export to `index.d.ts` for `web3-eth2-core` (#3878)
349351
- Deprecation of bzz warning (#3872)
350352
- Deprecation of shh warning (#3888)
351-
352-
## [Unreleased]
353-
354-
## [1.3.5]
355-
356-
### Added
357-
358-
- Github action for running tests for `web3-eth2-core` and `web3-eth2-beaconchain` packages (#3892)
359-
360-
### Changed
361-
362-
- Unified babel compiler for `web3-eth2-core` and `web3-eth2-beaconchain` (#3892)
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1+
12
{
2-
"presets": [
3-
"@babel/preset-env",
4-
"@babel/preset-typescript"
5-
],
6-
"plugins": [
7-
"@babel/plugin-proposal-class-properties",
8-
"@babel/plugin-transform-runtime"
9-
]
10-
}
3+
"presets": ["@babel/env", "@babel/typescript"],
4+
"plugins": [
5+
"@babel/proposal-class-properties",
6+
"@babel/proposal-object-rest-spread"
7+
]
8+
}

packages/web3-eth2-beaconchain/babel.config.js

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
roots: ['<rootDir>/test'],
3+
transform: {
4+
'^.+\\.tsx?$': 'ts-jest',
5+
},
6+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
7+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
8+
}

packages/web3-eth2-beaconchain/package-lock.json

Lines changed: 5139 additions & 11703 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web3-eth2-beaconchain",
3-
"version": "1.3.1",
3+
"version": "1.3.1ss",
44
"description": "Web3 ETH2 Beacon chain API wrappers.",
55
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-eth2-beaconchain",
66
"license": "LGPL-3.0",
@@ -10,27 +10,18 @@
1010
"types": "types.ts",
1111
"scripts": {
1212
"test": "jest",
13-
"tsc": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
14-
"type-check": "tsc --noEmit",
15-
"type-check:watch": "npm run type-check -- --watch"
13+
"tsc": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline"
1614
},
1715
"main": "lib/index.js",
1816
"dependencies": {
1917
"web3-eth2-core": "^1.3.0"
2018
},
2119
"devDependencies": {
22-
"@babel/cli": "^7.12.10",
23-
"@babel/core": "^7.12.10",
24-
"@babel/plugin-proposal-class-properties": "^7.12.1",
25-
"@babel/plugin-transform-runtime": "^7.12.10",
26-
"@babel/preset-env": "^7.12.11",
27-
"@babel/preset-typescript": "^7.12.7",
28-
"@babel/runtime": "^7.12.5",
2920
"@chainsafe/lodestar-types": "^0.13.0",
3021
"@types/jest": "^26.0.14",
3122
"@types/node": "^14.11.2",
32-
"babel-jest": "^26.6.3",
3323
"jest": "^26.4.2",
24+
"ts-jest": "^26.4.1",
3425
"typescript": "^4.0.3"
3526
}
3627
}

packages/web3-eth2-beaconchain/src/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { BaseAPISchema } from 'web3-eth2-core'
1+
import { IBaseAPISchema } from '../../web3-eth2-core/src/schema'
22

3-
export const DefaultSchema: BaseAPISchema = {
3+
export const DefaultSchema: IBaseAPISchema = {
44
packageName: 'eth2-beaconchain',
55
routePrefix: '/eth/v1/beacon/',
66
methods: [
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import jest from 'jest'
2+
3+
export const get = jest.fn(() => Promise.resolve({ data: {} }))

packages/web3-eth2-beaconchain/test/constructor.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ const providerSuffix = '/eth/v1/beacon/'
55

66
it('constructs a ETH2BeaconChain instance with expected properties', () => {
77
const eth2BeaconChain = new ETH2BeaconChain(provider)
8+
9+
// @ts-ignore - types not full implemented yet
810
expect(eth2BeaconChain.name).toBe('eth2-beaconchain')
11+
// @ts-ignore - types not full implemented yet
912
expect(eth2BeaconChain.provider).toBe(`${provider}${providerSuffix}`)
13+
// @ts-ignore - types not full implemented yet
1014
expect(eth2BeaconChain.protectProvider)
1115
})

packages/web3-eth2-beaconchain/test/schemaMethods.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ it('getValidatorBalances', async () => {
135135
expect(response[0]).toMatchObject(expectedResponse)
136136
})
137137

138-
xit('getEpochCommittees', async () => {
138+
it('getEpochCommittees', async () => {
139139
const routeParameters = {
140140
stateId: 'head',
141141
epoch: ''
Lines changed: 19 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,21 @@
11
{
22
"compilerOptions": {
3-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
4-
5-
/* Basic Options */
6-
// "incremental": true, /* Enable incremental compilation */
7-
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9-
// "lib": [], /* Specify library files to be included in the compilation. */
10-
// "allowJs": true, /* Allow javascript files to be compiled. */
11-
// "checkJs": true, /* Report errors in .js files. */
12-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
13-
// "declaration": true, /* Generates corresponding '.d.ts' file. */
14-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15-
// "sourceMap": true, /* Generates corresponding '.map' file. */
16-
// "outFile": "./", /* Concatenate and emit output to single file. */
17-
"outDir": "lib", /* Redirect output structure to the directory. */
18-
// "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19-
// "composite": true, /* Enable project compilation */
20-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21-
// "removeComments": true, /* Do not emit comments to output. */
22-
// "noEmit": true, /* Do not emit outputs. */
23-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
24-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26-
27-
/* Strict Type-Checking Options */
28-
"strict": true, /* Enable all strict type-checking options. */
29-
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30-
"strictNullChecks": true, /* Enable strict null checks. */
31-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
32-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36-
37-
/* Additional Checks */
38-
// "noUnusedLocals": true, /* Report errors on unused locals. */
39-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
40-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42-
43-
/* Module Resolution Options */
44-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
45-
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
46-
"paths": {"web3-eth2-beaconchain": ["."]}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
47-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
48-
// "typeRoots": [], /* List of folders to include type definitions from. */
49-
// "types": [], /* Type declaration files to be included in compilation. */
50-
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
52-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
54-
55-
/* Source Map Options */
56-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
57-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
59-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
60-
61-
/* Experimental Options */
62-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
63-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
64-
65-
/* Advanced Options */
66-
"skipLibCheck": true, /* Skip type checking of declaration files. */
67-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
68-
},
69-
"exclude": ["./test"]
70-
}
3+
"declaration": true,
4+
"outDir": "lib",
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"module": "commonjs",
8+
"lib": ["es6"],
9+
"target": "es6",
10+
"noImplicitAny": true,
11+
"noImplicitThis": true,
12+
"strictNullChecks": true,
13+
"strictFunctionTypes": true,
14+
"noEmit": true,
15+
"allowSyntheticDefaultImports": false,
16+
"baseUrl": ".",
17+
"paths": {
18+
"web3-eth2-beaconchain": ["."]
19+
}
20+
}
21+
}

packages/web3-eth2-core/.babelrc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
12
{
2-
"presets": [
3-
"@babel/preset-env",
4-
"@babel/preset-typescript"
5-
],
6-
"plugins": [
7-
"@babel/plugin-proposal-class-properties"
8-
]
9-
}
3+
"presets": ["@babel/env", "@babel/typescript"],
4+
"plugins": [
5+
"@babel/proposal-class-properties",
6+
"@babel/proposal-object-rest-spread"
7+
]
8+
}

packages/web3-eth2-core/babel.config.json

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

0 commit comments

Comments
 (0)