Code Monkey home page Code Monkey logo

Comments (9)

jakebailey avatar jakebailey commented on July 17, 2024 1

Using https://www.npmjs.com/package/every-ts:

$ every-ts bisect start
$ every-ts bisect bad main
$ every-ts bisect good 5.4.5
$ every-ts bisect run sh -c 'tsc -p tsconfig.json --outDir .'
c92bd16ac0e75834100ef57daa0083f161470509 is the first bad commit
commit c92bd16ac0e75834100ef57daa0083f161470509
Author: Sheetal Nandi <[email protected]>
Date:   Fri Apr 26 13:14:40 2024 -0700

    Exclude outDir and declarationDir even if they come from extended config (#58335)

Points to #58335, not #58042.

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

This was intentional change to exclude the outDir and declarationDir if no excludes are specified.

from typescript.

alexeagle avatar alexeagle commented on July 17, 2024

It seems like that PR intended to change it for the case where outDir and/or declarationDir appear in the extended tsconfig. file. Did you also instead to change the semantics for the --outDir command-line flag?

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

For all flags we normally dont care if its in config file or passed on commandLine, so thats what this change did - always exclude outDir and declaraitonDir

from typescript.

MichaelMitchell-at avatar MichaelMitchell-at commented on July 17, 2024

I think one would expect that these three tsconfigs would have identical behavior:

{
   "compilerOptions": {}
}
{
    "compilerOptions": {
        "outDir": "."
    }
}
{
    "compilerOptions": {
        "outDir": "."
    },
    "exclude": []
}

but (2) is the only one that fails with No inputs were found in config file.

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

But they are not same:

  1. is without any outDir
  2. Redirects output to outDir and there is no exclude specified so will exclude outdir
  3. Has explicit excludes so it doesnt add any data to it.

from typescript.

MichaelMitchell-at avatar MichaelMitchell-at commented on July 17, 2024

I recognize the behavioral difference, but it seems like something that will be a source of confusion for users. Also I just wanted to get clarification, should this behavior only apply to tsconfig files that have been "extends"ed from, or to any tsconfig files?

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

There is no change in behavior for scenario 2 with that PR. That behavior was always there

from typescript.

alexeagle avatar alexeagle commented on July 17, 2024

I believe that's not correct. Scenario 2 produced .js outputs prior to your commit, and now it's an error.

Note, the repro is even simpler than I wrote above:

ts59036 % touch index.ts tsconfig.json
ts59036 % npx -p [email protected] tsc --outDir . -p .
ts59036 % ls
index.js	index.ts	tsconfig.json
ts59036 % npx -p [email protected] tsc --outDir . -p .
error TS18003: No inputs were found in config file '/Users/alexeagle/repros/ts59036/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["/Users/alexeagle/repros/ts59036"]'.


Found 1 error.

from typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.