Skip to content

Conversation

krofax
Copy link
Collaborator

@krofax krofax commented Aug 23, 2024

Description

Migrate all mentions of pnpm to just

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

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for docs-optimism failed. Why did it fail? →

Name Link
🔨 Latest commit 7e9ddca
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/66c8d4eed43f650008962432

@cpengilly cpengilly linked an issue Aug 26, 2024 that may be closed by this pull request
@krofax krofax marked this pull request as ready for review August 30, 2024 08:44
@krofax krofax requested a review from a team as a code owner August 30, 2024 08:44
Copy link
Contributor

coderabbitai bot commented Aug 30, 2024

Walkthrough

The changes involve a transition from using pnpm to just for managing project dependencies and executing development commands across various documentation and configuration files. This includes updates to installation instructions, development scripts, and command usage, ensuring that all references to pnpm are replaced with just. The overall structure of the documentation remains intact, but the tooling recommended for developers has been updated.

Changes

Files Change Summary
CONTRIBUTING.md, README.md, notes/actions.md, notes/algolia-search.md, notes/remark.md, pages/... Updated references from pnpm to just for installation and development commands.
justfile Introduced a new justfile with defined recipes for various development tasks, replacing previous scripts in package.json.
package.json Removed all scripts related to linting, spellchecking, link checking, and development commands.
pages/builders/chain-operators/deploy/overview.mdx, pages/builders/chain-operators/tutorials/create-l2-rollup.mdx, pages/builders/node-operators/tutorials/node-from-source.mdx Updated tool requirements and commands to reflect the use of just instead of pnpm.

Possibly related issues


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1d33cb6 and 7e9ddca.

Files selected for processing (11)
  • CONTRIBUTING.md (2 hunks)
  • README.md (1 hunks)
  • justfile (1 hunks)
  • notes/actions.md (1 hunks)
  • notes/algolia-search.md (1 hunks)
  • notes/remark.md (1 hunks)
  • package.json (2 hunks)
  • pages/builders/app-developers/tutorials/cross-dom-solidity.mdx (1 hunks)
  • pages/builders/chain-operators/deploy/overview.mdx (1 hunks)
  • pages/builders/chain-operators/tutorials/create-l2-rollup.mdx (2 hunks)
  • pages/builders/node-operators/tutorials/node-from-source.mdx (2 hunks)
Files skipped from review due to trivial changes (4)
  • README.md
  • notes/algolia-search.md
  • notes/remark.md
  • pages/builders/app-developers/tutorials/cross-dom-solidity.mdx
Additional context used
Path-based instructions (3)
pages/builders/chain-operators/deploy/overview.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Use bold for prominence instead of all caps or italics.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
    "
pages/builders/node-operators/tutorials/node-from-source.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Use bold for prominence instead of all caps or italics.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
    "
pages/builders/chain-operators/tutorials/create-l2-rollup.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Use bold for prominence instead of all caps or italics.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
    "
LanguageTool
notes/actions.md

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...dards we apply. Run just lint to lint locally and run just 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 runjust fix` to fix issues that the linter can fix automati...

(FIX_RESOLVE)

CONTRIBUTING.md

[style] ~62-~62: Consider using a different verb for a more formal wording.
Context: ...information reported by the terminal to fix any issues (e.g., broken links). - Run...

(FIX_RESOLVE)

pages/builders/chain-operators/tutorials/create-l2-rollup.mdx

[style] ~147-~147: This phrase is redundant. Consider using “inside”.
Context: ...ll {<h3>Build the various packages inside of the Optimism Monorepo</h3>} bash ma...

(OUTSIDE_OF)

Additional comments not posted (11)
package.json (1)

Line range hint 1-56: Assess the impact of removed scripts on development workflow.

The removal of several scripts from package.json may significantly impact the development workflow and the enforcement of coding standards. It's crucial to verify that the new tooling and commands introduced in the justfile adequately replace these functionalities.

Consider verifying the new workflow by running the new commands and checking if they cover all the functionalities previously handled by the scripts in package.json.

pages/builders/node-operators/tutorials/node-from-source.mdx (2)

88-88: Command update from pnpm install to just install is correct.

This change correctly reflects the migration to just for dependency management.

The code changes are approved.


96-96: Command update from pnpm build to just build is correct.

This change correctly reflects the migration to just for building the project.

The code changes are approved.

CONTRIBUTING.md (5)

50-50: Command update from pnpm to just for dependency installation is correct.

This change correctly reflects the migration to just for dependency management.

The code changes are approved.


51-51: Command update from pnpm dev to just dev for starting the development server is correct.

This change correctly reflects the migration to just for starting the development server.

The code changes are approved.


63-63: Command update from pnpm fix to just fix for fixing linting issues is correct.

This change correctly reflects the migration to just for fixing linting issues.

The code changes are approved.


64-64: Command update from pnpm spellcheck:lint to just spellcheck:lint for linting spellcheck is correct.

This change correctly reflects the migration to just for linting spellcheck.

The code changes are approved.


65-65: Command update from pnpm spellcheck:fix to just spellcheck:fix for fixing spellcheck issues is correct.

This change correctly reflects the migration to just for fixing spellcheck issues.

The code changes are approved.

pages/builders/chain-operators/tutorials/create-l2-rollup.mdx (3)

43-43: Update the package manager in the software dependencies table.

The change from pnpm to just is correctly reflected in the software dependencies table. The version and command for verifying the version are appropriately updated.


144-144: Update the installation command to use just.

The command for installing dependencies has been correctly updated to just install, aligning with the migration from pnpm to just.


151-151: Update the build command to use just.

The command for building the various packages inside the Optimism Monorepo has been correctly updated to just build, aligning with the migration from pnpm to just.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.
Copy link
Contributor

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.

Suggested change
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. Run just lint to lint locally and run just 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 runjust fix` to fix issues that the linter can fix automati...

(FIX_RESOLVE)

Comment on lines +1 to +53
# 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
Copy link
Contributor

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` |
Copy link
Contributor

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` |
Copy link
Contributor

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.

Copy link
Collaborator

@sbvegan sbvegan left a 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.

Comment on lines +49 to +51
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
Copy link
Collaborator

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

Comment on lines +60 to +66
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").
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Comment on lines +7 to +11
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.
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```bash
make op-node op-batcher op-proposer
pnpm build
just build
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```bash
pnpm build
just build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

@krofax
Copy link
Collaborator Author

krofax commented Sep 25, 2024

@sbvegan

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.

This is completely valid, closing the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove pnpm/Javascript references
2 participants