Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

chore(package): get working paths option for ts-node #837

Merged
merged 4 commits into from
Feb 6, 2019

Conversation

layershifter
Copy link
Member

A small cut from my ongoing Lerna's PR, fixes the import issue from #817 (comment).

Adds tsconfig-paths as ts-node doesn't handle compilerOptions.paths:

@DustyTheBot
Copy link
Collaborator

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS

@codecov
Copy link

codecov bot commented Feb 4, 2019

Codecov Report

Merging #837 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #837   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files          21       21           
  Lines         728      728           
  Branches       69       69           
=======================================
  Hits          681      681           
  Misses         47       47

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 dbe337d...0147587. Read the comment docs.

@@ -1,4 +1,4 @@
import { Dropdown, Button, List } from '../../../../../../packages/react/src'
import { Dropdown, Button, List } from '@stardust-ui/react'
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

gulpfile.ts Outdated

// add node_modules/.bin to the path so we can invoke .bin CLIs in tasks
process.env.PATH =
process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin')

tsPaths.register({
baseUrl: '.',
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we use repo's path from config constant here as well? This will ensure consistency in the approach taken (there will be always single source of truth maintained)

Copy link
Member Author

Choose a reason for hiding this comment

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

Did it 👍

Copy link
Contributor

@kuzhelov kuzhelov left a comment

Choose a reason for hiding this comment

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

do like the changes, but would like to get better story on why this functionality wasn't implemented as part of ts-node itself (TypeStrong/ts-node#254 (comment)) - just to properly assess our risks here (if there are any). Will return back shortly

Copy link
Contributor

@kuzhelov kuzhelov left a comment

Choose a reason for hiding this comment

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

yep, even given that import statements transpilation strategy of this plugin is absolutely different from the strategy of TS compiler, it does exactly the thing we would like to have in these scenarios

@layershifter layershifter merged commit 6a049c1 into master Feb 6, 2019
@layershifter layershifter deleted the chore/add-paths-resolve branch February 6, 2019 09:05
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