-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: changes to correct typescript detection behavior #22058
Merged
tgriesser
merged 9 commits into
develop
from
tgriesser/fix/change-typescript-detection-rules
Jun 2, 2022
Merged
fix: changes to correct typescript detection behavior #22058
tgriesser
merged 9 commits into
develop
from
tgriesser/fix/change-typescript-detection-rules
Jun 2, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for taking the time to open a PR!
|
mjhenkes
reviewed
Jun 2, 2022
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
mjhenkes
reviewed
Jun 2, 2022
…hub.com:cypress-io/cypress into tgriesser/fix/change-typescript-detection-rules * 'tgriesser/fix/change-typescript-detection-rules' of github.com:cypress-io/cypress: Update packages/scaffold-config/src/detect.ts
mjhenkes
approved these changes
Jun 2, 2022
mjhenkes
approved these changes
Jun 2, 2022
…hub.com:cypress-io/cypress into tgriesser/fix/change-typescript-detection-rules * 'tgriesser/fix/change-typescript-detection-rules' of github.com:cypress-io/cypress: fix: do not watch specs on run mode (#22060) fix: #22038 support esm import for windows (#22042) fix: Change ffmpeg to post process at priority 20 (#21587)
ZachJW34
approved these changes
Jun 2, 2022
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.
Ran through all the scenarios, works great.
@@ -120,7 +120,24 @@ export function detectLanguage (projectRoot: string, pkgJson: PkgJson): 'js' | ' | |||
debug('Did not find cypress.config file') | |||
} | |||
|
|||
if ('typescript' in (pkgJson.dependencies || {}) || 'typescript' in (pkgJson.devDependencies || {})) { | |||
// If we can't find an installed TypeScript or ESBuild, there's no way we can assume the project is using TypeScript, |
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.
nit: or ESBuild
I don't see anywhere we are checking for ESBuild
estrada9166
approved these changes
Jun 2, 2022
tgriesser
commented
Jun 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User facing changelog
typescript
actually exists (viarequire.resolve
) and is specified independencies
/devDependencies
before migrating a project to use it.*tsconfig.json
glob, which should only happen when we're creating a new project, not migrating an existing one. If we're migrating, looking at the existing files in the cypress folder should be enough info to make the determination..d.ts
files when making the determination of JS vs. TS projectAdditional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?