Skip to content

chore: introduce zx, corepack and setup script #2754

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

Merged
merged 8 commits into from
Apr 14, 2023
Merged

Conversation

hyf0
Copy link
Contributor

@hyf0 hyf0 commented Apr 14, 2023

Summary

🤖 Generated by Copilot at 2e274e3

This pull request adds a setup script and a doctor script to the project to help developers prepare their environment and tools for working on the project. It also adds some comments to disable TypeScript checking for some JavaScript files that use external modules and features. Additionally, it adds a .gitignore file, a package.json file, and a tsconfig.json file to the scripts folder to manage the dependencies and configuration of the scripts.

Walkthrough

🤖 Generated by Copilot at 2e274e3

  • Add a setup script and a doctor script to improve the developer workflow and environment (link, link, link)
  • Run the doctor script automatically before installing dependencies with pnpm (link)
  • Add TypeScript support and configuration for the scripts folder (link)
  • Add the zx module as a dependency for writing shell scripts in JavaScript and TypeScript (link)
  • Disable TypeScript checking for JavaScript files that use Node.js or external modules and functions (link, link, link, link, link, link)
  • Ignore the node_modules folder in the scripts folder (link)

Related issue (if exists)

#2678

@hyf0 hyf0 requested a review from hardfist as a code owner April 14, 2023 08:05
@changeset-bot
Copy link

changeset-bot bot commented Apr 14, 2023

⚠️ No Changeset found

Latest commit: bd1f7bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 14, 2023
@hyf0 hyf0 requested a review from Boshen April 14, 2023 08:05
@hyf0 hyf0 force-pushed the feat127381203813092 branch from 2e274e3 to e8b5ef5 Compare April 14, 2023 08:41
@hyf0 hyf0 requested a review from Boshen April 14, 2023 08:57
@hyf0 hyf0 changed the title chore: introduce corepack and setup script chore: introduce zx, corepack and setup script Apr 14, 2023
@hyf0 hyf0 added this pull request to the merge queue Apr 14, 2023
Merged via the queue into main with commit 60b4533 Apr 14, 2023
@hyf0 hyf0 deleted the feat127381203813092 branch April 14, 2023 09:20
@Boshen
Copy link
Contributor

Boshen commented Apr 14, 2023

@hyf0 I think we have a chicken and egg problem here, we haven't done npm install here so zx is undefined ...

rspack  main ❯ node scripts/meta/setup.mjs
node:internal/errors:478
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'zx' imported from /Users/bytedance/github/rspack/scripts/meta/setup.mjs

@hyf0
Copy link
Contributor Author

hyf0 commented Apr 14, 2023

You are right. It looks like setup.mjs shouldn't rely on any dependency. Yeah, I just realized the reason why I create the folder using the name meta :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants