-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: check whether or not yarn is installed #265
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vercel/turbo-site/TWMxADmQHYSd2HUtvFvLGky4oKvN |
|
||
export function shouldUseYarn(): boolean { |
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.
Why is this insufficient?
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.
It's not. I just figured, that we can use hasExecutable
in order to determine whether or not yarn is installed. Since hasExecutable
returns a Promise<boolean>
I just removed the type here.
This actually seems like a duplicate of #255. Going to close this since the other PR came first. Really appreciate the effort and contribution! |
This moves `FileSystem::parent_path` (which takes a `FileSystemPathVc`) to be directly on `FileSystemPathVc`. There's already a `FileSystemPathVc::parent` method which internally calls `FileSystem::parent_path` with self, which seems to be an indirect way to implement this. With the new method location, we're able to take advantage of `FileSystemPathVc::new_normalized` to skip some unnecessary work. And we also reduce duplication, there were two nearly identical implementations of `parent_path` between `DevServerFileSystem` and `DiskFileSystem`.
… not (#264) This makes turbopack automatically create `app/layout.js` if `app/page.js` exists, or `app/layout.tsx` if `app/page.tsx` exists, and neither layout file already exists. **Note that I'd prefer this issue to have info severity, but even with a higher log level of info, the issue is never shown**. Filed #265 to track this. Test Plan: In a new `create-next-app`, opt into appDirectory and create `app/page.js`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.js` was created * [x] `app/layout.js` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.tsx` was created * [x] `app/layout.tsx` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Also create a basic `app/layout.js` (note js layout with tsx page). Add a custom `<title>` to the layout. Run turbopack and verify: * [x] the index page renders correctly * [x] No issue is logged * [x] No files are modified * [x] The custom `<title>` is reflected.
… not (vercel/turborepo#264) This makes turbopack automatically create `app/layout.js` if `app/page.js` exists, or `app/layout.tsx` if `app/page.tsx` exists, and neither layout file already exists. **Note that I'd prefer this issue to have info severity, but even with a higher log level of info, the issue is never shown**. Filed vercel/turborepo#265 to track this. Test Plan: In a new `create-next-app`, opt into appDirectory and create `app/page.js`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.js` was created * [x] `app/layout.js` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.tsx` was created * [x] `app/layout.tsx` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Also create a basic `app/layout.js` (note js layout with tsx page). Add a custom `<title>` to the layout. Run turbopack and verify: * [x] the index page renders correctly * [x] No issue is logged * [x] No files are modified * [x] The custom `<title>` is reflected.
… not (vercel/turborepo#264) This makes turbopack automatically create `app/layout.js` if `app/page.js` exists, or `app/layout.tsx` if `app/page.tsx` exists, and neither layout file already exists. **Note that I'd prefer this issue to have info severity, but even with a higher log level of info, the issue is never shown**. Filed vercel/turborepo#265 to track this. Test Plan: In a new `create-next-app`, opt into appDirectory and create `app/page.js`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.js` was created * [x] `app/layout.js` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Run turbopack and verify: * [x] the index page renders correctly * [x] An issue with Warning level is logged notifying the user an `app/layout.tsx` was created * [x] `app/layout.tsx` is actually created with basic root layout In a new `create-next-app`, opt into appDirectory and create `app/page.tsx`. Also create a basic `app/layout.js` (note js layout with tsx page). Add a custom `<title>` to the layout. Run turbopack and verify: * [x] the index page renders correctly * [x] No issue is logged * [x] No files are modified * [x] The custom `<title>` is reflected.
fixes #241