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

feat: add support for jsconfig.json #199

Merged
merged 6 commits into from Apr 18, 2022
Merged

Conversation

F3n67u
Copy link
Contributor

@F3n67u F3n67u commented Mar 25, 2022

close #127

@F3n67u
Copy link
Contributor Author

F3n67u commented Mar 25, 2022

@jonaskello please help review this pr. thanks

src/tsconfig-loader.ts Outdated Show resolved Hide resolved
@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 14, 2022

@jonaskello please help review this pr. thanks

@jonaskello do you have time to review this feature?

Copy link
Contributor

@aleclarson aleclarson left a comment

Choose a reason for hiding this comment

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

It would be more efficient to use readdirSync here, which is only one I/O call instead of two existsSync I/O calls.

@jonaskello
Copy link
Member

@F3n67u I've asked @aleclarson to review this one

@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 16, 2022

It would be more efficient to use readdirSync here, which is only one I/O call instead of two existsSync I/O calls.

@aleclarson thanks for your time. I already use readdirSync instead of existSync

Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
}

const parentDirectory = path.join(directory, "../");
Copy link
Contributor

Choose a reason for hiding this comment

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

@jonaskello Was there a good reason for using path.join instead of path.dirname here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • path.join('/root/dir', '../') return /root/
  • path.dirname('/root/dir') return /root(without the trailing directory separators)

the latter is normalized, easier to mock when we mock the fs.readdirSync, so I adjust path.join to path.dirname; though path.join(directory, '..') is fine either.

F3n67u and others added 2 commits April 17, 2022 09:28
Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com>
@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 17, 2022

@aleclarson could help take a look at other 2 pr I made?

@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 17, 2022

@aleclarson I see you approved this pr. do you have enough permission to merge this pr?

@jonaskello
Copy link
Member

@F3n67u Can you also update the README and CHANGELOG (under unreleased entry)? After that we should be good to merge.

@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 18, 2022

@F3n67u Can you also update the README and CHANGELOG (under unreleased entry)? After that we should be good to merge.

all done! thanks for your time. @jonaskello

@MichaelDeBoey
Copy link
Contributor

@aleclarson @dividab @jonaskello Any idea when this will be released?

@jonaskello
Copy link
Member

We need to get #206 merged before next release because #205 is merged but needs to be changed by #206.

@MichaelDeBoey
Copy link
Contributor

@jonaskello Would it be possible to temporarily revert #205 and cut a release already please?

This would help the work I'm doing on Remix Stacks (see remix-run/indie-stack#63, remix-run/blues-stack#57 & remix-run/grunge-stack#50) a lot.
That way we could use tsconfig-paths to load jsconfig too instead of trying out a custom solution.

aleclarson added a commit to aleclarson/tsconfig-paths that referenced this pull request May 2, 2022
@jonaskello
Copy link
Member

@MichaelDeBoey This is released now in 4.0.0.

@MichaelDeBoey
Copy link
Contributor

@jonaskello Are there any breaking changes?
Looking at the CHANGELOG there aren't, but wanted to check to be sure.

@jonaskello
Copy link
Member

The breaking changes are listed under the "changed" heading in the changelog.

@aleclarson
Copy link
Contributor

This has a bug. We should be setting allowJs to true for jsconfig.json files.

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.

Support jsconfig.json
4 participants