Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

fix: add rootDir from tsconfig for plugins that use it #39

Merged
merged 2 commits into from
Jun 18, 2018

Conversation

amphro
Copy link
Contributor

@amphro amphro commented Jun 18, 2018

No description provided.

src/ts_node.ts Outdated
const rootDir = (rootDirs || [])[0]
if (!rootDir || !outDir) return orig
const {rootDir, rootDirs, outDir} = tsconfig.compilerOptions
const rootDirPath = (rootDirs || (rootDir && [rootDir]) || [])[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

could we instead make this const rootDirPath = rootDir || (rootDirs || [])[0]? I think rootDir should be the default if it is defined. We could improve this with _.castArray(), but we can't use lodash here unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh yeah, that is a lot better. Let me update.

@codecov
Copy link

codecov bot commented Jun 18, 2018

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   62.47%   62.47%           
=======================================
  Files           7        7           
  Lines         421      421           
  Branches      115      115           
=======================================
  Hits          263      263           
  Misses        113      113           
  Partials       45       45
Impacted Files Coverage Δ
src/ts_node.ts 75.51% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c5284d...b1406ae. Read the comment docs.

@jdx jdx merged commit a6078d1 into oclif:master Jun 18, 2018
jdx pushed a commit that referenced this pull request Jun 18, 2018
<a name="1.6.32"></a>
## [1.6.32](v1.6.31...v1.6.32) (2018-06-18)

### Bug Fixes

* add rootDir from tsconfig for plugins that use it ([#39](#39)) ([a6078d1](a6078d1))
@oclif-bot
Copy link
Contributor

🎉 This PR is included in version 1.6.32 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants