66 Commits

Author SHA1 Message Date
philknows
62d3e49f28 chore: bump package versions to 1.38.0 2025-12-10 11:44:00 -05:00
philknows
2303b06a91 chore: bump package versions to 1.37.0 2025-11-28 10:17:20 -05:00
philknows
6eb05a083a chore: bump package versions to 1.36.0 2025-11-04 12:28:29 -05:00
Nazar Hussain
a0d00ac6dc chore: cleanup types exports for all packages (#8434)
**Motivation**

Make the types exports consistent for all packages. 

All modern runtimes support [conditional
exports](https://nodejs.org/api/packages.html#conditional-exports) and
there are caveats when we have both conditional exports and normal
exports present in a package.json. This PR tend to make all exports
follow same consistent and modern pattern.

**Description**

- We were using subpath exports for some packages and module exports for
other
- Keep all the types export consistent as subpath exports.
- Remove "types" and "exports` directive from package.json 
- Remove `typesVersions`, this is useful only if we have different
version of types for different versions of Typescript. Or having
different types files for different file paths.


**Steps to test or reproduce**

- Run all CI
2025-10-20 09:03:08 -04:00
philknows
825a186b76 chore: bump package versions to 1.35.0 2025-10-08 18:10:13 -04:00
Nazar Hussain
8689cc3545 chore: add src to the package to have working source map (#8460)
**Motivation**

Add `src` directory to package sources along with the `lib` files to
have working source map.

**Description**

- Add `src` to the files.


**Steps to test or reproduce**

- Run all tests
2025-09-25 07:23:58 -04:00
Cayman
6494939cd0 chore: add bun exports to packages (#8448)
**Motivation**

- #7280 

**Description**

- Add `"bun"` export to all packages that points to the _typescript
source_ rather than the transpiled javascript
- Allows for bun to use typescript directly
2025-09-23 12:19:11 +01:00
Nazar Hussain
0c6f50771f chore: use latest TS module resolution (#8419)
**Motivation**

Use latest `module` and `moduleResolution` for TS.

**Description**

- To use [subpath
imports](https://nodejs.org/api/packages.html#subpath-imports) in the PR
#8320 we need to update the module solution strategy for TS.
- That requires to change the `module` for the TS as well. 
- Earlier tried to stay with `node18` or `node20`, but the `ts-node`
does not work with that.
- Maintaining different tsconfig for ts-node is more of hassle on wrong
run.
- So decided to stick with `nodenext` strategy for `moduleResolution` 

**Steps to test or reproduce**

Run all tests

---------

Co-authored-by: Cayman <caymannava@gmail.com>
2025-09-18 11:36:48 -04:00
Phil Ngo
86490969b7 chore: bump package versions to 1.34.1 2025-09-10 16:34:42 -04:00
Phil Ngo
1a17514b02 chore: bump package versions to 1.34.0 2025-09-05 12:24:08 -04:00
Phil Ngo
7afce97ce3 chore: bump package versions to 1.33.0 2025-07-31 15:05:32 -04:00
Phil Ngo
36dbfb2cfe chore: bump package versions to 1.32.0 2025-07-09 14:35:57 -04:00
Phil Ngo
8847b4a92b chore: bump package versions to 1.31.0 2025-06-03 14:16:18 -04:00
Nico Flaig
fa41ea44de chore: bump @chainsafe/threads to v1.11.2 (#7877)
**Motivation**
- https://github.com/ChainSafe/lodestar/issues/5552 is still an issue

**Description**

- Includes https://github.com/ChainSafe/threads.js/pull/4 to get rid of
`MaxListenersExceededWarning`
2025-05-27 08:41:33 -04:00
Phil Ngo
123eb2d9fb chore: bump package versions to 1.30.0 2025-05-09 12:15:00 -04:00
Nico Flaig
fa898bb319 chore: restructure tests (#7793)
Follow up to https://github.com/ChainSafe/lodestar/pull/7610 with a few
restructuring suggestions, see comments below for detailed changes,
revives constants tests we are no longer running in CI and makes each
package executable separately again, ie. `cd packages/<package-name>`
into `yarn test:unit` works for all packages again.

One major change is that unit tests default should be written with
`mainnet` preset in mind as I noticed that makes a lot more sense for a
bunch of existing tests, eg. we have tests that depend on external
fixtures, like api spec tests for events and those are not compatible
with `minimal` preset. Also there doesn't seem to be much downside in
most cases for unit tests to use `mainnet` preset as it does not run
through all the epoch, like for example a e2e or sim test does. So
overall, it allows us to use mainnet fixtures / more "real world" data
which seems better with little to no downside.


Time comparison running unit tests on `unstable` vs. this branch

**unstable**

![image](https://github.com/user-attachments/assets/ba9c8e68-ec1a-4cb7-90fc-eb00cedae4bf)

**nflaig/restructure-tests**

![image](https://github.com/user-attachments/assets/0ffab5a4-4a71-42e1-a26e-32fc5627b873)

There is just a difference of 2 seconds (might be a fluke) in a 6 minute
run, this seems acceptable to me considering the benefits of using
`mainnet` preset noted above.
2025-05-07 18:21:12 +01:00
Nazar Hussain
c91cd9c141 test: use vitest workspace to run all tests (#7610)
**Motivation**

Vitest workspaces is feature to mimic the package manager workspaces for
the tests only.

It provides following benefits:

1. Minimize the need the bunch of config files at every package root 
2. Consolidate vitest configuration in project groups
3. Use consistent test configuration for all projects in the monorepo
4. Providing consistent test environment for all packages
5. Speed up visual interaction with tests in the IDEs (e.g. Visual
Studio Code)

**Description**

- Remove all unnecessary config files
- Update package json scripts to use `--project` flag

Closes #7603


Now we have following test directories. 

| Directory | Description | CurrentPreset | Old Preset | 
|---|---|---|---|
| test/unit | Unit tests | minimal | Default export from `params`
package |
| test/unit-mainnet | Unit tests | mainnet | mainnet | 
| test/e2e | End-to-End Tests | minimal | Default export from `params`
package |
| test/e2e-mainnet | End-to-End Tests | mainnet | Never existed before,
mixed up pattern in different packages |
| test/spec | Spec tests | minimal | Default export from `params`
package, but common perception among team was that it's running with
`minimal` |
| test/spec-mainnet` | Spec tests | mainnet | Never existed as
directory, but mixed up among packages |
| test/browser | Symlink to `unit` for packages which supports browsers
| minimal | Default export from `params` package |
| test/types | Types test | minimal | Default export from `params`
package |


**Steps to test or reproduce**

Run all tests
2025-04-22 11:33:36 +02:00
Nico Flaig
51613f0fb0 chore: bump package versions to 1.29.0 2025-04-19 16:27:49 +01:00
Phil Ngo
40d04deac5 chore: bump package versions to 1.28.1 2025-03-20 13:35:15 -04:00
Nico Flaig
461532eeed chore: bump package versions to 1.28.0 2025-03-18 18:38:52 +00:00
Nazar Hussain
51efa3d604 chore: update the test runner (#7404)
**Motivation**

Update vitest and browser engine.

**Description**

- Move root level shared configs to `configs` directory
- Update to vitest 3.x
- Migrate from `webdriverio` to `playwright` which is more stable and
recommended by Vitest.

**NOTE**
Reverted the `playwright` upgrade. See the comments. 


d2a7af0308/configs/vitest.config.base.browser.ts (L41-L43)

**Steps to test or reproduce**

Run all tests
2025-02-27 10:27:43 -05:00
Nico Flaig
3b0ca8df3b chore: bump package versions to 1.27.1 2025-02-24 14:58:39 +00:00
Phil Ngo
2ddcd2052c chore: bump package versions to 1.27.0 2025-02-13 09:06:43 -05:00
Phil Ngo
6fb5b9a81b chore: bump package versions to 1.26.0 2025-01-31 11:25:02 -05:00
Phil Ngo
e30fd40c05 chore: bump package versions to 1.25.0 2025-01-10 12:07:35 -05:00
Cayman
ca315d4d9e chore: bump package versions to 1.24.0 2024-12-20 10:16:01 -05:00
Phil Ngo
36be6b39d1 chore: bump package versions to 1.23.1 2024-11-28 12:54:20 -05:00
Cayman
70f67bbfe9 chore: bump package versions to 1.23.0 2024-10-29 17:02:01 -04:00
Nazar Hussain
5c359f92dc deps: migrate to biomejs from eslint (#7108)
* Replace eslint with biomejs

* Update the inclusion of word

* Fix the formatting

* Update the lint task to do all checks

* Update biome rules from eslint config

* Replace eslint with biomejs

* Update the inclusion of word

* Fix the formatting

* Update the lint task to do all checks

* Update biome rules from eslint config

* Fix all lint issues

* Fix formatting

* Add extension recomendation for vscode

* Enable recommended rules

* Enable rule noUselessSwitchCase

* Enable rule noUselessConstructor

* Fix the types

* Fix unit tests

* Enforce import extensions

* Update the cli command

* Enforce useConsistentMemberAccessibility

* Update rules

* Fix rules

* Upgrade biomejs to latest version

* Update the rules

* Update and format the config file

* Fix types break during merge

* Fix unused check

* Add comment for explicit-return-type

* Remove eslint file

* Add _e objects for empty catch blocks

* Update formatter config

* Fix formatting
2024-10-10 12:43:36 -04:00
Phil Ngo
25837f61fe Merge branch 'stable' into unstable 2024-09-17 14:45:18 -04:00
Cayman
360fe779cd chore: bump package versions to 1.21.0 2024-08-06 16:58:51 -04:00
Phil Ngo
01fde1283f chore: bump package versions to 1.20.2 2024-07-19 07:55:30 -04:00
Cayman
71bcde86de chore: bump package versions to 1.20.1 2024-07-15 16:17:24 -04:00
Phil Ngo
b49beacb42 chore: bump package versions to 1.20.0 2024-07-09 11:54:24 -04:00
Cayman
6c987446e3 chore: bump package versions to 1.19.0 2024-06-04 15:34:44 -04:00
Phil Ngo
fe1e8c2b18 chore: bump package versions to 1.18.1 2024-05-13 03:25:35 -04:00
Cayman
71aea4b1c8 chore: bump package versions to 1.18.0 2024-04-23 14:32:10 -04:00
Phil Ngo
88b2564e4f v1.17.0 2024-03-08 10:39:20 -05:00
Julien
f62bc13d89 chore: cleanup older dependencies (#6482)
* chore: cleanup older dependencies

* chore: some more removed dependencies
2024-02-26 17:53:15 -05:00
Cayman
fda3b19c4f v1.16.0 2024-02-20 13:16:26 -05:00
Nazar Hussain
da0bcc8f19 test: support .env.test to reuse env variables across the tests (#6408)
* Variables using .env file

* Add env variable support to normal tests

* Fix the order of variables

* Update the order of jobs

* Export the varible using actions toolkit

* Update the workflow tasks

* Fix the sim workflow

* Add .env.test file support to tests

* Fix the lint

* Update the task description

* Move lodestar preset to env file

* Fix the directory path

* newline

* Update debugging spec tests section

* Update the env variable for preset

* Fix the path for setup files

* Update code as per feedback

* Fix the e2e variables

* Update doc

* Fix the bash script

* Fix sim geth runne

* Update the env file

* Fix e2e tests

* Update the script tasks

* Update the script tasks

* Add minimal for e2e tests

* Add minimal for e2e tests

* Update comments in preset tests

* Downgrade nethermind version

* Load env file in e2e env

* Add the issue link in env variable

* Update bash script for failsafe current dir

* Fix the mistaken genesis extension for el nodes

* Add missing capella wait for one test

* Downgrade the geth version

* Update .env.test

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
2024-02-12 14:36:33 +01:00
Cayman
6a479118cb chore: merge branch 'stable' into unstable 2024-02-07 11:00:26 -05:00
Phil Ngo
1857a49404 chore: v1.15.1 release (#6379)
* v1.15.1

* fix: ignore stale keystore lockfiles (#6363)

* fix: ignore stale keystore lockfiles

* Update error message if lockfile is already acquired

* Update keymanager lockfile e2e tests

* fix: ignore forkchoice invalidations if latestValidHash not found (#6361)

* fix: ignore forkchoice invalidations if latestValidHash not found

* rename for better understanding

* update the lvh search start index

* apply feedback

* fix: parse --blindedLocal flag value as boolean (#6403)

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Co-authored-by: g11tech <develop@g11tech.io>
2024-02-07 08:39:24 -05:00
Julien
ed43a988bf chore: align vitest config filenames (#6369) 2024-01-29 12:53:35 -05:00
Phil Ngo
d6a7a3982b chore: merge v1.15 stable back to unstable (#6372) 2024-01-29 09:48:52 -05:00
Julien
01d47b9a09 chore: align test scripts (#6339)
* chore: align yarn test scripts

* fix: handle prover stratup failure

* fix: lint

* chore: improve test guide

* chore: introduce top level download-spec-tests script

* chore: remove pretest scripts
2024-01-25 11:00:48 +01:00
Phil Ngo
92ed3479a6 v1.15.0 2024-01-23 11:06:39 -05:00
Nazar Hussain
5b129f0f00 chore: cleanup mocha/chai/sinon usage across the repo (#6311)
* Cleanup mocha/chai usage

* Split the config files for each package

* Fix types

* Fix lint errors

* Sort the lint rules

* Fix types

* Cleanup sinon usage

* Fix tests

* Fix lint error

* Add vitest word to dictionary

* Fix the test iteration

* Fix e2e tests

* Sort the words

* Fix sim test assertion

* Fix data import

* Fix import order for mocks

* Fix import order

* Fix e2e tests

* Add contribution guide

* Fix the lint error

* Add src to dictionary

* Remove eslint-disable for skipped tests

* Fix assertions

* Update CONTRIBUTING.md

Co-authored-by: Matthew Keil <me@matthewkeil.com>

---------

Co-authored-by: Matthew Keil <me@matthewkeil.com>
2024-01-22 18:35:20 +01:00
Phil Ngo
02370a91e9 v1.14.0 2024-01-12 12:51:18 -05:00
Nazar Hussain
1200c59793 test: migrate logger tests to vitest (#6220)
* Migrate logger tests to vitest

* Remove lint comment
2023-12-26 12:15:17 +01:00