Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Deprecate TSD #269

Open
blakeembrey opened this issue Jan 26, 2016 · 15 comments
Open

Deprecate TSD #269

blakeembrey opened this issue Jan 26, 2016 · 15 comments

Comments

@blakeembrey
Copy link
Member

The Typings project (https://github.com/typings/typings) has evolved and can currently consume DefinitelyTyped as a subset of the ecosystem. This improvement has effectively make TSD maintenance redundant and over time definitions should be written as external modules with typings.json, or converted inline with libraries for the TypeScript compiler to consume directly.

This issue will be closed when an official website for Typings is created and improved documentation can be linked to. Currently it serves as a notice for new or existing users.

To continuing installing type definitions from DefinitelyTyped, remember to use the --ambient flag (everything in DefinitelyTyped is essentially "global"). If you intend to publish a library using dependencies without type definitions (E.g. you installed typings from DefinitelyTyped/Typings), you will need to make sure those are dependencies (and not ambient). The core issue with global dependencies is maintenance and conflicts.

typings install node --save --ambient

TSD PRs and issues will continue to be responded to, but development is effectively EOL. If another developer would like to pick up maintenance and/or development, you are welcome to contribute. Existing issues should be solved already with Typings, but if you find something that does not work - make an issue in Typings.

Links: #150, typings/discussions#5 and typings/typings#125.

Edit: Typings has implemented an upgrade command for TSD users. Upgrading will only convert the format of tsd.json to typings.json, there may be additional tweaks you need to make (such as correcting now stripped references).

typings init --upgrade
@PatrickJS
Copy link

👍

for refernces to upgrade from tsd

webpack+typescript
angular/universal-starter@cfb7b52

gulpjs+typescript
https://github.com/angular/answers-app/pull/27/files

gulpjs with typescript
https://gist.github.com/gdi2290/e544407980e261acc172

commands

$ npm uninstall tsd
$ rm -rf typings
$ npm install typings
$ typings init --upgrade
$ rm tsd.json
$ typings install

@goenning
Copy link

Just a small addition to @gdi2290 migration steps regarding something that just happened to me.
If someone follows it and end up with hundreds of TS2300: duplicate indetifier ... during compiling, the solution is here https://www.npmjs.com/package/typings#maindts-and-browserdts

@amcdnl
Copy link

amcdnl commented Jan 28, 2016

How do you do tsd link with typings?

@blakeembrey
Copy link
Member Author

How do you do tsd link with typings?

You don't. TSD link is flawed and not really a solid long-term solution - as it relies on ambient modules, causes duplicate identifiers and generally forces users to re-install sub-dependencies. Assuming you want the exact same thing, you can do typings install npm:<library>/<path-to-d-ts> --ambient. Most likely, you want a different solution where sub-dependencies are being handled properly. In that case, publish your typings.json file with your library and do typings install npm:<library> --save - the dependencies in <library>/typings.json will resolve.

@SonofNun15
Copy link

Ran into an issue installing typings from another repository. Created an new issue: typings/typings#133

@avanderhoorn
Copy link

Just wondering what the vision/intent here is for DefinitelyTyped/tsd vs Typings? I get that Typings is decentralised and that it can talk to DefinitelyTyped, but I also know that Typings has repos for some popular projects as well... hence my question.

@nhhockeyplayer
Copy link

Wouldn't it make sense to mandate all typedefs be forced centralized in npm package installations instead of replicating half the efrastructure inside our local projects ?

  • no tsd
  • no typings
  • no replication of effort
  • no repeat dependency footprints...

JSPM is alarmingly a case in point

NPM already has the fittings to support and process this.

Is anyone even theorizing the impact of transient dependencies ?

I wouldn't send my kid to a daycare, which subs out the task to another daycare somewhere else... something is eventually going to disconnect... let alone a single transient dependency roaming thru the ecosystem.

@PatrickJS
Copy link

@nhhockeyplayer ideally that would be the case but for this to happen every author would need to include and maintain type definitions.

Related

For Angular 2 we can assume every ng2 module will include type definitions but for the other modules that will likely not be the case. So there will be a community (ng2) who will benefit more by ensuring every module in it's ecosystem includes type definitions (the ideal case).

rinogo added a commit to rinogo/ionic-cross-platform-boilerplate that referenced this issue Jun 8, 2016
TSD has been deprecated
(DefinitelyTyped/tsd#269), with typings
suggested as the replacement.  These changes migrate the code from TSD
to typings.
@timneutkens
Copy link

@blakeembrey sorry for bumping this issue. Just noticed the deprecation notice added to the readme here on github is not on npm which could lead to people still using it without initial knowledge that the package is deprecated. It's probably because there was no new release since the package got deprecated.

@blakeembrey
Copy link
Member Author

blakeembrey commented Jul 2, 2016

If you do NPM install, it says it.

Edit: But I'll check it out and release a new version.

@timneutkens
Copy link

Cool, then it's fine 👍

@h0ru5
Copy link

h0ru5 commented Aug 28, 2016

could you add a deprecation notice to the npm page?
Makes it easier for returners to figure out about typings.

@ghost
Copy link

ghost commented Oct 3, 2016

It would be cool to ship complete and finished version of typings first and then deprecate tsd because right now typings only makes things harder and confusing with this mess with multiple repos IMO. 😠

@xmcclure
Copy link

xmcclure commented Mar 14, 2017

There are four issues on this issues page now dating back months, pointing out that tsd no longer functions for installing basic packages such as jquery or react. Deprecating or halting development is one thing, but it appears tsd has actually been shut down (?). This is a real problem— especially since there seems to have been no kind of explicit announcement service was outright discontinuing— since tsd is the kind of tool which could be part of automated deployment. I just had a web service kill itself because its automated deployment runs tsd, which no longer works.

@blakeembrey
Copy link
Member Author

It says it is deprecated on install for over a year now. Since TSD is based on GitHub, it all still works perfectly fine. What you'd be seeing is DefinitelyTyped changes. The TSD architecture can not handle the changes, and the move was a decision from TypeScript to support NPM @types.

teamdandelion pushed a commit to tensorflow/tensorboard that referenced this issue May 23, 2017
Reason: tsd is deprecated (DefinitelyTyped/tsd#269) and typings is the new standard. Also, tsd was behaving badly - running `tsd install` on a clean client was causing it to incorrectly depend on typing files from node_modules, which resulted in a broken build. This issue does not exist with typings.

For convenience, and since typings is really fast when all deps are up-to-date, I made it a part of the standard gulp task. `npm install` so you have all the deps, and running `gulp` will keep the typing files synchronized - there no longer is a separate step for downloading them.

The logical next step is to do the same for bower. I did wire that up, but I will not connect it to the gulp task until after the big bower dependency upgrade CL is through. If I add it right now, it will fail on unresolved dependency conflicts and make everyone sad.
Change: 115370585
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants