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

Load typescript transpiler if available #459

Merged
merged 1 commit into from
Nov 4, 2019
Merged

Load typescript transpiler if available #459

merged 1 commit into from
Nov 4, 2019

Conversation

sveyret
Copy link
Contributor

@sveyret sveyret commented Nov 2, 2019

This will allow the require of the webpack configuration file, even in TypeScript, without the need to run depcheck with ts-node. This needs that depcheck can find the typescript dependency, either directly in the scanned project, in the current directory, or in the directory of depcheck.

Issue #246

@codecov
Copy link

codecov bot commented Nov 2, 2019

Codecov Report

Merging #459 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
+ Coverage   99.19%   99.21%   +0.01%     
==========================================
  Files          39       39              
  Lines         749      761      +12     
==========================================
+ Hits          743      755      +12     
  Misses          6        6
Impacted Files Coverage Δ
src/utils/index.js 94.44% <100%> (+0.69%) ⬆️
src/index.js 100% <100%> (ø) ⬆️

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 d2057a0...c824eb8. Read the comment docs.

@sveyret
Copy link
Contributor Author

sveyret commented Nov 2, 2019

Adding the typescript dependency removed all the optional keys from the package-lock.json file. Don't know if it is a problem…

@rumpl
Copy link
Member

rumpl commented Nov 2, 2019

Not a problem no

@VincentLanglet
Copy link
Contributor

Adding the typescript dependency removed all the optional keys from the package-lock.json file. Don't know if it is a problem…

I think this depend of the npm version you use

package.json Outdated
@@ -16,8 +16,8 @@
"scripts": {
"component": "node -r @babel/register ./build/component.js > ./dist/component.json",
"compile": "babel src/ -d dist/",
"depcheck": "node ./bin/depcheck.js --ignore-dirs=fake_modules",
Copy link
Member

Choose a reason for hiding this comment

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

We have a nifty file for this, you can even add a comment as to why you are adding the import

@rumpl rumpl merged commit 64ebbfc into depcheck:master Nov 4, 2019
@sveyret sveyret deleted the loadTS branch November 4, 2019 16:42
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.

None yet

3 participants