-
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
Conversation
❌ Deploy Preview for docs-optimism failed. Why did it fail? →
|
WalkthroughThe changes involve a transition from using Changes
Possibly related issues
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (11)
Files skipped from review due to trivial changes (4)
Additional context usedPath-based instructions (3)
LanguageTool
Additional comments not posted (11)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 4
|
||
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 comment
The 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 just
, aligning with the PR's objective. However, the text can be improved for better readability and formality:
- Consider adding a comma after "lint locally" for better readability.
- Replace "fix" with "resolve" for a more formal tone.
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
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
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. |
Tools
LanguageTool
[uncategorized] ~6-~6: Possible missing comma found.
Context: ...dards we apply. Runjust lint
to lint locally and runjust fix
to fix issues that t...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~6-~6: Consider using a different verb for a more formal wording.
Context: ...to lint locally and run
just fix` to fix issues that the linter can fix automati...(FIX_RESOLVE)
# List available recipes | ||
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 No newline at end of file |
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.
Align justfile
with PR objectives by replacing pnpm
with just
.
The file introduces several new commands but continues to use pnpm
which contradicts the PR's objective to migrate to just
. Consider replacing all instances of pnpm
with just
or other appropriate commands that align with the new tooling.
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.
Committable suggestion was skipped due to low confidence.
| [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 comment
The reason will be displayed to describe this comment to others. Learn more.
Update to just
is well-executed, but consider additional formatting improvements.
The migration from pnpm
to just
is accurately reflected in the documentation. However, ensure that:
- Proper nouns are used consistently.
- The imperative form is maintained throughout.
- Proper capitalization and the Oxford comma are used where necessary.
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.
| [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 comment
The reason will be displayed to describe this comment to others. Learn more.
Update to just
is well-executed, but consider additional formatting improvements.
The migration from pnpm
to just
is accurately reflected in the documentation. However, ensure that:
- Proper nouns are used consistently.
- The imperative form is maintained throughout.
- Proper capitalization and the Oxford comma are used where necessary.
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.
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.
Overall this migration away from pnpm to just in the monorepo is a little more nuanced and will require a deeper dive into the changes that were made. I also am not convinced we need to add just to the docs repo.
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 |
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 to just
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"). |
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.
Same comment as above
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. |
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.
revert
@@ -0,0 +1,53 @@ | |||
# List available recipes |
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.
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 pnpm
as the package manager. It seems like the addition of just
is extra overhead. Whereas in the monorepo, the javascript has been removed.
|
||
```bash | ||
pnpm install | ||
just install |
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.
This doesn't map directly to the new justfile: https://github.com/ethereum-optimism/optimism/blob/develop/justfile
```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 comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
|
||
{<h3>Install Node.js dependencies</h3>} | ||
|
||
Install the Node.js dependencies for the Optimism Monorepo. |
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.
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 comment
The 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
|
||
```bash | ||
pnpm build | ||
just build |
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.
same comment
This is completely valid, closing the PR. |
Description
Migrate all mentions of
pnpm
tojust
Tests
Please describe any tests you've added. If you've added no tests, or left important behavior untested, please explain why not.
Additional context
Add any other context about the problem you're solving.
Metadata