-
Notifications
You must be signed in to change notification settings - Fork 265
Migrate pnpm to just #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate pnpm to just #850
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,9 @@ The Optimism Documentation team has created a complete style guide for you to ma | |
|
||
To set up the Nextra project on your machine, perform the following steps from a terminal instance: | ||
|
||
1. Install pnpm [install pnpm](https://pnpm.io/installation). | ||
2. First, run `pnpm i` to install the dependencies. | ||
3. Then, run `pnpm dev` to start the development server and | ||
1. [Install just](https://github.com/casey/just) | ||
2. First, run `just i` to install the dependencies. | ||
3. Then, run `just dev` to start the development server and | ||
4. Visit [localhost:3000](http://localhost:3000) in your browser to view the website. | ||
|
||
You can now start changing content and see the website updated live each time you save a new file. 🤓 | ||
|
@@ -57,13 +57,13 @@ You can now start changing content and see the website updated live each time yo | |
|
||
**Important prerequisite** | ||
|
||
To prevent building issues upstream, you should build the content locally before submitting a pull request: stop or delete the terminal server if it's running, then run `pnpm dev`. | ||
To prevent building issues upstream, you should build the content locally before submitting a pull request: stop or delete the terminal server if it's running, then run `just dev`. | ||
|
||
- Use the information reported by the terminal to fix any issues (e.g., broken links). | ||
- Run `pnpm fix` to automatically fix most linting issues (e.g., formatting and style guide). | ||
- Run `pnpm spellcheck:lint` to test your content against the dictionary. Add new words to the dictionary by appending them to `words.txt`. | ||
- Run `pnpm spellcheck:fix` to add new words to the dictionary automatically. | ||
- Try another `pnpm dev` and repeat until no issues are reported ("client" and "server compiled successfully"). | ||
- Run `just fix` to automatically fix most linting issues (e.g., formatting and style guide). | ||
- Run `just spellcheck:lint` to test your content against the dictionary. Add new words to the dictionary by appending them to `words.txt`. | ||
- Run `just spellcheck:fix` to add new words to the dictionary automatically. | ||
- Try another `just dev` and repeat until no issues are reported ("client" and "server compiled successfully"). | ||
Comment on lines
+60
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above |
||
|
||
|
||
Your pull request should usually target the `main` branch, though the Optimism Documentation team might sometimes ask you to target another branch. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ This repo houses the Optimism Docs located at [docs.optimism.io](https://docs.op | |
|
||
## Local Development | ||
|
||
How to [install pnpm](https://pnpm.io/installation) | ||
How to [Install just](https://github.com/casey/just) | ||
|
||
First, run `pnpm i` to install the dependencies. | ||
First, run `just i` to install the dependencies. | ||
|
||
Then, run `pnpm dev` to start the development server and visit localhost:3000. | ||
Then, run `just dev` to start the development server and visit localhost:3000. | ||
Comment on lines
+7
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert |
||
|
||
## Contributions | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# List available recipes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooohhhhh you added just to the docs project, I'm on the fence about adding it in the docs repo tbh. I'd be interested to hear what the other folks on the docs team think. Its my opinion that because this repository uses javascript as a dependency, it makes sense to keep |
||
default: | ||
@just --list | ||
|
||
# Lint | ||
lint: spellcheck-lint | ||
pnpm eslint . --ext mdx --max-warnings 0 | ||
|
||
# Fix | ||
fix: spellcheck-fix | ||
pnpm eslint . --ext mdx --fix | ||
|
||
# Spellcheck lint | ||
spellcheck-lint: | ||
pnpm cspell lint "**/*.mdx" | ||
|
||
# Spellcheck fix | ||
spellcheck-fix: | ||
pnpm cspell --words-only --unique "**/*.mdx" | sort --ignore-case | uniq > words.txt | ||
|
||
# Link check | ||
linkcheck: | ||
pnpm lychee --config ./lychee.toml --quiet "./pages" | ||
|
||
# Index docs | ||
index-docs: | ||
pnpm ts-node --skip-project utils/algolia-indexer.ts | ||
|
||
# Dev server | ||
dev: | ||
pnpm next dev | ||
|
||
# Build | ||
build: | ||
pnpm next build | ||
|
||
# Start | ||
start: | ||
pnpm next start | ||
|
||
# Post-build (sitemap generation) | ||
sitemap: | ||
pnpm next-sitemap | ||
|
||
# Full build process | ||
full-build: build sitemap | ||
|
||
# Install dependencies | ||
install: | ||
pnpm install | ||
|
||
# Run all checks | ||
check: lint linkcheck | ||
Comment on lines
+1
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align The file introduces several new commands but continues to use Here is a suggested change for one of the commands as an example: -lint: spellcheck-lint
- pnpm eslint . --ext mdx --max-warnings 0
+lint: spellcheck-lint
+ just eslint . --ext mdx --max-warnings 0 Apply similar changes to all other commands in the file.
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,7 +3,7 @@ | |||||
## Linting | ||||||
|
||||||
The `lint.yml` workflow checks that all Markdown and JavaScript files conform to the linting standards we apply. | ||||||
Run `pnpm lint` to lint locally and run `pnpm fix` to fix issues that the linter can fix automatically. | ||||||
Run `just lint` to lint locally and run `just fix` to fix issues that the linter can fix automatically. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Improve readability and formality in linting commands. The commands have been updated to use
Apply this diff to improve the text: -Run `just lint` to lint locally and run `just fix` to fix issues that the linter can fix automatically.
+Run `just lint` to lint locally, and run `just resolve` to resolve issues that the linter can fix automatically. Committable suggestion
Suggested change
ToolsLanguageTool
|
||||||
All PRs must pass this check. | ||||||
Also includes spellchecking via [cspell](https://cspell.org/). | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,6 @@ | |
"name": "op-docs", | ||
"version": "0.0.1", | ||
"description": "Optimism Docs", | ||
"scripts": { | ||
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint", | ||
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix", | ||
"spellcheck:lint": "cspell lint \"**/*.mdx\"", | ||
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt", | ||
"linkcheck": "lychee --config ./lychee.toml --quiet \"./pages\"", | ||
"index:docs": "npx ts-node --skip-project utils/algolia-indexer.ts", | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"postbuild": "next-sitemap" | ||
}, | ||
"dependencies": { | ||
"@eth-optimism/contracts-ts": "^0.17.0", | ||
"@eth-optimism/tokenlist": "^9.0.9", | ||
|
@@ -65,4 +53,4 @@ | |
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ communication and reconciliation between state changes. | |
| [git](https://git-scm.com/) | `^2` | `git --version` | | ||
| [go](https://go.dev/) | `^1.21` | `go version` | | ||
| [node](https://nodejs.org/en/) | `^20` | `node --version` | | ||
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` | | ||
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update to The migration from
The code changes are approved. Consider reviewing the entire document to ensure it aligns with the best practices for Markdown documentation as specified in the additional instructions. |
||
| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` | | ||
| [make](https://linux.die.net/man/1/make) | `^3` | `make --version` | | ||
| [jq](https://github.com/jqlang/jq) | `^1.6` | `jq --version` | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ Make sure to check out the [Superchain Explainer](/stack/explainer) to learn mor | |
| [git](https://git-scm.com/) | `^2` | `git --version` | | ||
| [go](https://go.dev/) | `^1.21` | `go version` | | ||
| [node](https://nodejs.org/en/) | `^20` | `node --version` | | ||
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` | | ||
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` | | ||
| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` | | ||
| [make](https://linux.die.net/man/1/make) | `^3` | `make --version` | | ||
| [jq](https://github.com/jqlang/jq) | `^1.6` | `jq --version` | | ||
|
@@ -141,14 +141,14 @@ If you don't have the correct versions installed, you may run into unexpected er | |
{<h3>Install dependencies</h3>} | ||
|
||
```bash | ||
pnpm install | ||
just install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't map directly to the new justfile: https://github.com/ethereum-optimism/optimism/blob/develop/justfile |
||
``` | ||
|
||
{<h3>Build the various packages inside of the Optimism Monorepo</h3>} | ||
|
||
```bash | ||
make op-node op-batcher op-proposer | ||
pnpm build | ||
just build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above |
||
``` | ||
|
||
</Steps> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ In this tutorial you will build the `l2geth` implementation of Legacy Geth as fo | |
| [git](https://git-scm.com/) | `^2` | `git --version` | | ||
| [go](https://go.dev/) | `^1.21` | `go version` | | ||
| [node](https://nodejs.org/en/) | `^20` | `node --version` | | ||
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` | | ||
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update to The migration from
The code changes are approved. Consider reviewing the entire document to ensure it aligns with the best practices for Markdown documentation as specified in the additional instructions. |
||
| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` | | ||
| [make](https://linux.die.net/man/1/make) | `^4` | `make --version` | | ||
|
||
|
@@ -85,15 +85,15 @@ Some releases may only be required for the OP Sepolia testnet. | |
Install the Node.js dependencies for the Optimism Monorepo. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no longer javascript/nodejs in the monorepo |
||
|
||
```bash | ||
pnpm install | ||
just install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesn't map to the justfile https://github.com/ethereum-optimism/optimism/blob/develop/justfile |
||
``` | ||
|
||
{<h3>Build Node.js packages</h3>} | ||
|
||
Build the Node.js packages for the Optimism Monorepo. | ||
|
||
```bash | ||
pnpm build | ||
just build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment |
||
``` | ||
|
||
{<h3>Build op-node</h3>} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets revert these changes. The documentation repository still uses
pnpm
. The monorepo migrated tojust