Skip to content
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

refactor: use tsx instead of ts-node #54

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

thucpn
Copy link
Collaborator

@thucpn thucpn commented Apr 19, 2024

Summary by CodeRabbit

  • Documentation

    • Updated the installation command in the contributing guide.
  • New Features

    • Transitioned from ts-node to tsx for script execution in various project templates, enhancing performance and compatibility.
  • Refactor

    • Simplified TypeScript configurations by removing specific ts-node settings, improving maintainability and potentially affecting module resolution.

@thucpn thucpn requested a review from marcusschiesser April 19, 2024 08:11
Copy link

changeset-bot bot commented Apr 19, 2024

🦋 Changeset detected

Latest commit: 4e66426

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-llama Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

coderabbitai bot commented Apr 19, 2024

Walkthrough

The recent updates involve transitioning from ts-node to tsx across various project configurations and scripts. This includes changes in global commands, updating dependencies in package.json files, and modifying TypeScript configurations to align with the new tsx usage, enhancing script execution and module resolution behaviors.

Changes

File Path Change Summary
CONTRIBUTING.md Updated global npm installation command to pnpm tsx.
helpers/typescript.ts Changed script command from ts-node to tsx.
.../express/package.json, .../nextjs/package.json Updated dependency from ts-node to tsx 4.7.2.
.../express/tsconfig.json, .../nextjs/tsconfig.json Removed ts-node configuration, simplifying TypeScript settings.

🐰✨
In the land of code where the rabbits hop,
ts-node fades while tsx pops.
With a swift command and a config tweak,
Our code runs smoother, oh so sleek!
Cheers to changes, big and small,
Hop along, coders, one and all! 🌟🐇


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d2ed7ce and 4e66426.
Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)
Additional Context Used
LanguageTool (14)
CONTRIBUTING.md (14)

Near line 5: The official spelling of this programming framework is “Node.js”.
Context: ...ntributing ## Getting Started Install NodeJS. Preferably v18 using nvm or n. Inside...


Near line 5: Possible spelling mistake found.
Context: ...d Install NodeJS. Preferably v18 using nvm or n. Inside the create-llama direct...


Near line 5: Make sure that the single character ‘n’ is correct and is not a typing error.
Context: ...all NodeJS. Preferably v18 using nvm or n. Inside the create-llama directory: ...


Near line 14: Possible spelling mistake found.
Context: ...-g pnpm pnpm install ``` Note: we use pnpm in this repo, which has a lot of the sa...


Near line 14: Possible spelling mistake found.
Context: ...e same functionality and CLI options as npm but it does do some things better, like...


Near line 14: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ame functionality and CLI options as npm but it does do some things better, like cac...


Near line 18: Consider inserting a comma for improved readability.
Context: ...g. ### Building When we publish to NPM we will have a [ncc](https://github.com/ve...


Near line 18: Possible spelling mistake found.
Context: ... When we publish to NPM we will have a ncc compile...


Near line 47: Possible missing comma found.
Context: ...pnpm run e2e To write new test cases write them in e2e ## Changeset...


Near line 47: Unpaired symbol: ‘]’ seems to be missing
Context: ... To write new test cases write them in e2e ## Changeset We use [change...


Near line 49: Possible spelling mistake found.
Context: ...est cases write them in e2e ## Changeset We use [changesets](https://github.com...


Near line 51: Possible spelling mistake found.
Context: ...m in e2e ## Changeset We use [changesets](https://github.com/changesets/changese...


Near line 51: Possible spelling mistake found.
Context: ...ersions and changelogs. To create a new changeset, run: pnpm changeset Please s...


Near line 57: Possible spelling mistake found.
Context: ...hangeset ``` Please send a descriptive changeset for each PR. ## Publishing (maintainer...

Additional comments not posted (5)
CONTRIBUTING.md (5)

Line range hint 5-5: Correct the spelling of "NodeJS" to "Node.js" for official usage.


10-10: The installation command has been updated to npm i -g pnpm. This change aligns with the previous comment from marcusschiesser suggesting a global installation of pnpm. Ensure this is the intended command as per the new tooling requirements.


Line range hint 14-14: Consider adding a comma before "but" for better readability: "...npm but it does do some things better, like caching."


Line range hint 18-18: Consider adding a comma after "NPM" for improved readability: "When we publish to NPM, we will have a ncc compiled version of the tool."


Line range hint 47-47: Add a comma after "cases" for better readability: "To write new test cases, write them in e2e."


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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@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: 0

Actionable comments outside the diff hunks (4)
CONTRIBUTING.md (4)

Line range hint 5-5: Correct the spelling of "Node.js" for consistency and professionalism.

- Install NodeJS. Preferably v18 using nvm or n.
+ Install Node.js. Preferably v18 using nvm or n.

Line range hint 14-14: Improve the readability by adding a comma before "but".

- Note: we use pnpm in this repo, which has a lot of the same functionality and CLI options as npm but it does do some things better, like caching.
+ Note: we use pnpm in this repo, which has a lot of the same functionality and CLI options as npm, but it does do some things better, like caching.

Line range hint 18-18: Add a comma after "NPM" for better readability.

- When we publish to NPM we will have a [ncc](https://github.com/vercel/ncc) compiled version of the tool.
+ When we publish to NPM, we will have a [ncc](https://github.com/vercel/ncc) compiled version of the tool.

Line range hint 47-47: Add a comma after "cases" to improve sentence flow.

- To write new test cases write them in [e2e](/e2e)
+ To write new test cases, write them in [e2e](/e2e)

CONTRIBUTING.md Outdated Show resolved Hide resolved
@marcusschiesser marcusschiesser merged commit 418bf9b into main Apr 22, 2024
4 of 5 checks passed
@marcusschiesser marcusschiesser deleted the refactor/use-tsx-instead-of-ts-node branch April 22, 2024 02:04
Copy link

@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: 1

Actionable comments outside the diff hunks (5)
CONTRIBUTING.md (5)

Line range hint 20-20: Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

Line range hint 31-31: Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

Line range hint 37-37: Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

Line range hint 43-43: Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

Line range hint 53-53: Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

@@ -7,7 +7,7 @@ Install NodeJS. Preferably v18 using nvm or n.
Inside the `create-llama` directory:

```
Copy link

Choose a reason for hiding this comment

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

Specify the language for the fenced code block to enable syntax highlighting. For example, use ```shell for shell commands.

- ```
+ ```shell

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.

2 participants