Skip to content

Commit

Permalink
Added some docs updates for npm mismatch and other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Oct 8, 2024
1 parent 5faae0c commit 9f580d1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
21 changes: 17 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Thanks for your interest in contributing to Turbo!

- [Rust](https://www.rust-lang.org/tools/install)
- [cargo-groups](https://github.com/nicholaslyang/cargo-groups)
- NodeJS v18
- npm v10.5.0 (note: this is determined by the GitHub Actions CI, when in doubt, look at what the runner is using)
- capnproto
- protoc

### Linux Dependencies

Expand Down Expand Up @@ -71,10 +75,6 @@ Then from the root directory, you can run:
```bash
pnpm test -- --filter=cli
```
- A single Go unit test (see more [in the Go docs](https://pkg.go.dev/cmd/go#hdr-Test_packages))
```bash
cd cli && go test ./[path/to/package/]
```
- Rust unit tests ([install `nextest` first](https://nexte.st/book/pre-built-binaries.html))
```bash
cargo nextest run -p turborepo-lib --features rustls-tls
Expand All @@ -96,6 +96,19 @@ Then from the root directory, you can run:

Note: this is not through turbo, so you'll have to build turbo yourself first.
- Updating Integration Tests
```
pnpm -- turbo run build --filter=cli
pnpm test:interactive -F turborepo-tests-integration
```
You can pass a test name to run a single test, or a directory to run all tests in that directory.
```
pnpm test:interactive -F turborepo-tests-integration -- run-summary.t
```
- Example tests
```bash
pnpm test -- --filter=turborepo-tests-examples -- <example-name> <packagemanager>
Expand Down
7 changes: 7 additions & 0 deletions troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ environment variable. With this, you can set different log levels per module.
For syntax, see the [Env Filter Syntax][1]

[1][https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html]

## Failing integration tests due to hash changes

If a lot of integration tests are failing with changes in the hash for `package-lock.json`,
you might be using an old version of `npm`. We try to set it in the test (`setup_package_manager.sh` and
`setup_integration_test.sh`), but if your version is too old, it might not work.
In which case, upgrade it to whatever the GitHub Actions runner uses.
2 changes: 2 additions & 0 deletions turborepo-tests/helpers/setup_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -eo pipefail
FIXTURE_NAME="${1-basic_monorepo}"

# Default to version of npm installed with Node 18.20.2
# If CI is failing, check that this version is the same as
# the CI runner's version of npm
PACKAGE_MANAGER="[email protected]"
if [[ $2 != "" ]]; then
PACKAGE_MANAGER="$2"
Expand Down

0 comments on commit 9f580d1

Please sign in to comment.