Skip to content

Trim tsconfig files; move untested files to OTHER_FILES.txt#40676

Merged
sandersn merged 26 commits intomasterfrom
move-untested-sourcefiles-to-OTHER_FILES
Nov 26, 2019
Merged

Trim tsconfig files; move untested files to OTHER_FILES.txt#40676
sandersn merged 26 commits intomasterfrom
move-untested-sourcefiles-to-OTHER_FILES

Conversation

@sandersn
Copy link
Contributor

@sandersn sandersn commented Nov 26, 2019

This is the last major step of microsoft/types-publisher#708. It does two things:

  1. Trim the files list of all tsconfig.json down to test files and index.d.ts. Any other d.ts file needs to be referenced [transitively] either from index.d.ts or from a test file.
  2. Add unreferenced d.ts files to OTHER_FILES.txt

Notably, it does not revise the instructions for what to put in tsconfig/OTHER_FILES. I'll do that in a followup PR.

In a few case, I had to manually add references. These are the only d.ts files that are changed; everything else is just tsconfig.json/OTHER_FILES.txt:

  1. codemirror, plus a dependency react-codemirror
  2. dwt, just v13
  3. rangy
  4. slickgrid
  5. strophe.js
  6. strophejs, plus a dependency strophejs-plugin-roster
  7. waypoints

These packages do not use imports, so I added <reference types=... to the tests. Unfortunately, due to a bug in name resolution, types references don't respect baseUrl/typeRoots the way imports do, so I had to use a roundabout reference that only works with Typescript 3.2 and higher:

/// <reference types="../rangy/rangy-classapplier" />

That is, I used a relative reference which included the package name. I changed types-publisher so that CI tests allow this kind of reference in tests.

Codemirror is the only widely used package in the list, and it already required Typescript 2.8, so I think the jump to 3.2 is not horrible.

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). The Travis CI build failed labels Nov 26, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Nov 26, 2019

@sandersn Thank you for submitting this PR!

🔔 @s0m3on3 @maxveres @CBaptiste @Haroenv @samouss @keichinger @neryortez @antoinerousseau @lucapasquale @aDEVE @dan-grayson @PeterEsenwa @bodinsamuel @rscotten @kopertio @breeze9527 @ldrick @grothem @mnahkies @abreits @nfantone @Zelein @diegovilar @thorn0 @calebstdenis @leonard-thieu @scipper @daltin @mcchatman8009 @ExE-Boss @kylejlin @hallettj @fpascutti @GlenCFL @smhxx @lierdakil @senukartur @threesquared @jcaffey @mattmeye @albertovasquez @Azure @davecardwell @AndrewLeedham @Bartvds @rsamec @ffflorian @kalbert312 @matthewkimber @otiai10 @couven92 @rreverser @sreimer15 @MatCarlson @ekinsol @tregagnon @Serabe @craigrbruce @brandonrisell @adidahiya @JKillian @seansfkelley @mradamczyk @marvinhagemeister @joshmccullough @uhyo @RamanBut-Husaim @gcastre @ClearBlade @clentfort @jasongi-at-sportsbet @sashashakun @mihailik @nrbernard @Pr1st0n @rileymiller @toddself @ysulyma @BendingBender @Airlun @derekcicerone @unindented @alxHenry @hagl @swese44 @hiraash @RWander @forrestbice @jndonald3 @dfreeman @misak113 @mhegazy @davidmpaz @aleccool213 @falconertc @adamzerella @TareqElMasri @stevechun @hammadj @santiagofm @maxkomarychev @Ragg- @vansimke @yushulx @jbh @lincoln2018 @Tom-Dynamsoft @dsueltenfuss @MathiasPaumgarten @xieisabug @AntiMoron @liveangela @Ovilia @iRON5 @bilalucar @tmtron @dwhitney @ruixuel @dwickern @mike-north @chriskrycho @tansongyang @scalvert @Jessidhia @Nicell @elvis-wolcott @iKBAHT @ifiokjr @e-cloud @onigoetz @johnnyreilly @ljharb @pmdartus @j-f1 @saadq @JasonHK @LKay @scottleedavis @afroozeh @snakedrak @Akuukis @SanderDeWaal1992 @j2L4e @RazzM13 @loyd @waitingsong @keerthi16 @KiranNiranjan @VladimirGrenaderov @maxbogus @soywiz @smac89 @stkb @GiedriusGrabauskas @xbim @forivall @claasahl @kruncher @Feinbube @milanpro @rohitkr @shivarajkv @DenisCarriere @HandyG52 @excelulous @afromogli @bryanforbes @marcuslongmuir @kamthamc @abonander @mike-marcacci @ChristopherHaws @Jack-Works @NoHomey @saboya @lenovouser @sergey-buturlakin @ngbrown @rokoroku @danielnixon @jgainfort @brookback @adripanico @beraliv @drax98 @101100 @ajafff @aimee-gm @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @DickvdBrink @King2500 @terrymun @pikachuexe @brieb @bjacobel @gunnim @jason076 @MajorBreakfast @bookmoons @kerol2r20 @tlaziuk @hirochachacha @grabofus @darkwebdev @alejo90 @g-rath @szhu @ovidiubute @bczengel @chrootsu @stepancar @aj-r @jtmthf @DomiR @WilliamChelman @stephenlautier @typicode @niieani @BrentDouglas @ckosti @agroupp @ggilmore @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel @andrei-markeev @lmachens @gunn @alesn @perbergland @nicu-chiciuc @jedigo @dhritzkiv @NewFuture @wechat-miniprogram-admin @spacejack @isiahmeadows @Nemo157 @tkqubo @Seally @jaminfarr @buzinas @mrrichar @elhaard @pkeuter @mcdado @woodenconsulting @cahilfoley @samuelneff @ThomasHickman @nju33 @bash @fadezhanger @saschazar21 @Ovyerus @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @brunoscheufler @tellnes @touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @samuela @kuehlein @j-oliveras @bhongy @chyzwar @trivikr @nguymin4 @yoursunny @jeremiergz @ivansieder @torstenwerner @nikcorg @vinaybedre @kyranet @JasonLi914 @wilsonianb @southpolesteve @alexandrusavin @dolanmiu @tniessen @pvigier @IGI-111 @rogierschouten @dex4er @bioball @smithkl42 @hanreev @chrisbarker @rdepena @whyn07m3 @licui3936 @tomer-openfin @nolakara @jingxwu @p5-types @Zalastax @ChaosinaCan @jon-fearer @cjbarth @dassennato @ksamborski @josecolella @jbaldwin @1999 @hellochar @PikachuEXE @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath @jonfreedman @meganrm @milesjos @skippercool @zeroyoichihachi @mtadams007 @ikatyang @sosukesuzuki @jurca @kisaraofpern @cdeutsch @ksm2 @SerbanGhita @JasonKaz @angrykoala @danfma @TheHandsomeCoder @donnut @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @samsonkeung @angeloocana @raynerd @moshensky @ethanresnick @leighman @deftomat @blimusiek @biern @rayhaneh @rgm @drewwyatt @jottenlips @minitesh @krantisinh @pirix-gh @brekk @nemo108 @jituanlin @Philippe-mills @Saul-Mirone @bbenezech @pzavolinsky @digiguru @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @saranshkataria @lukyth @zieka @piotrwitek @paustint @pikpok @strongpauly @janb87 @ldthorne @siavelis @TomasHubelbauer @lksilva @SergeyBelofost @marknelissen @KenneyE @PaitoAnderson @michalak111 @guoshencheng @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @aaronbeall @t49tran @bes @collingreen @trevonmckay @velveret @rudi-c @markspolakovs @mntdn @nkgrnkgr @0815Strohhut @dnlfrst @ericktamayo @vincentjames501 @ark120202 @dawnmist @beeequeue @robcodemonkey @MartynasZilinskas @danielearwicker @jsonunger @gburgett @jpowell @benjaminRomano @odensc @ianks @iMobs @dbartholomae @activescott @efedorenko @iRoachie @timwangdev @robertying @Naturalclar @CodeDaraW @nhardy @gricey432 @forabi @graphcool @voxmatt @alloy @npirotte @ckknight @kastermester @mattkrick @jdk243 @renanmav @mrk21 @vasek17 @awendland @KostyaEsmukov @huy-nguyen @grmiade @DaIgeb @egorshulga @rraina @pret-a-porter @8enSmith @wezleytsai @HipsterBrown @ssorallen @gillchristian @nulladdict @vlesierse @olmobrutall @sudoplz @Methuselah96 @thchia @danieldelcore @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @onatm @ninjaferret @tehbi4 @misantronic @darkartur @endurance @RCGuillaume @royxue @psakalo @Havret @andys8 @Gelio @cpepin @ntnbrtnkv @arvitaly @lochbrunner @jgoz @Epskampie @ybiquitous @tu4mo @kaoDev @guntherjh @wasd171 @szabolcsx @Stevearzh @mgoszcz2 @brandonhall @sbusch @azmenak @lencioni @antonvasin @vittorio @lhache @lavoaster @autoric @akameco @aikoven @bancek @alsiola @huwmartin @m-b-davis @maddijoyce @smifun @mshaaban088 @esetnik @bwlt @mrsekut @abemedia @carsonf @keenondrums @tomasz-zablocki @dante-101 @iamkd @n1ru4l @makepost @chigix @bios21 @cglantschnig @joeskeen @AyaMorisawa @mastermatt @vansergen @gustavohenke @swashcap @karak @adrianhopebailie @olegdokuka @brycematheson1234 @DanielRose @BillArmstrong @Kuniwak @cnishina @SupernaviX @bendxn @oddui @beta-vulgaris @Dzenly @thislooksfun @sant123 @iddan @DazSanchez @johncaruso @bryceg @grgisme @emyrold @thisnameissoclever @ayeboah @soney @ericyhwang @nikeee @voy @gkalpak @pheromonez @aldafu @msanguineti @MutterPedro @Maw-Fox @maartenstaa @waynevanson @Hozuki @lonyele @wanganjun @RobinvanTienhoven @mattferderer @DavidKDeutsch @LeartS @Igorbek @Igmat @jkillian @flavordaaave @wagerfield @rynclark @sgaliano @lucax88x @ematseruk @odahcam @jmca @daem0ndev @LiadIdan @nkappler @alexkrolick @kentcdodds @weyert @danieljcafonso @dcloudio @RodneyJT @xt0rted @petejohanson @ljqx @teamworkguy2 @adamvoss @iamolivinius @felipeochoa @rauno56 @tgfjt @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq @keatz55 @MunifTanjim @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas @gjanblaszczyk @sroucheray @AkxeOne @meikidd @joeflateau @ckybonist @janesser @jubairsaidi @orblazer @dominikbulaj @Koloto @evil-shrike @nakakura @Jimexist @giladsegal @dsifford @sirreal @ykzts @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath @redlickigrzegorz @72636c @ColinBradley @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC @steffenvv - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

typescript-bot commented Nov 26, 2019

@sandersn The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Copy link
Contributor

@ExE-Boss ExE-Boss left a comment

Choose a reason for hiding this comment

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

I believe that this is a good idea.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Nov 26, 2019
@sandersn
Copy link
Contributor Author

Times out on Travis =(
Still running on Azure.

@sandersn sandersn merged commit c8089e9 into master Nov 26, 2019
@sandersn sandersn deleted the move-untested-sourcefiles-to-OTHER_FILES branch November 26, 2019 20:49
@typescript-bot
Copy link
Contributor

I just published @types/angular@1.6.57 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/cldrjs@0.4.22 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/codemirror@0.0.81 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/dwt@13.4.6 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/i2c-bus@1.0.27 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/rangy@0.0.33 to npm.

@antoinerousseau
Copy link
Contributor

antoinerousseau commented Nov 27, 2019

Does @typescript-bot really have to ping the whole planet for a review? :/

ping @RyanCavanaugh

@ExE-Boss ExE-Boss mentioned this pull request Nov 27, 2019
12 tasks
},
"files": [
"index.d.ts",
"lite/index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean if a user imports algoliasearch/lite now? I think I'm a little lost :)

Copy link
Contributor Author

@sandersn sandersn Nov 27, 2019

Choose a reason for hiding this comment

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

Nothing changes for users — notice that algoliasearch wasn't one of the packages that published a new version.

In fact, nothing really changes for algoliasearch since its tests already import and test algoliasearch/lite. lite/index.d.ts just isn't in tsconfig.json anymore, which means that it won't be published unless you test it — what algoliasearch does — or add it to OTHER_FILES.txt to indicate that it should be published untested. Only about 100 packages do the latter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, that makes lots of sense, and makes it simpler to add "common" files which aren't exports. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants