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

Can this depends on @types? #1

Closed
unional opened this issue Jun 12, 2017 · 12 comments
Closed

Can this depends on @types? #1

unional opened this issue Jun 12, 2017 · 12 comments

Comments

@unional
Copy link

unional commented Jun 12, 2017

For the two deps: bluebird and rethinkdb, and node. in package.json

@blakeembrey @marshall007

@marshall007
Copy link
Collaborator

@unional are you saying I should have these as dependencies in the package.json instead of as typings dependencies?

I had based this on types/npm-rethinkdb/typings.json and was just following it by example.

@unional
Copy link
Author

unional commented Jun 12, 2017

Yes, and keeping the typings.json will work for the registry.
Putting them in package.json allows user to install this typing by npm install types/rethinkdbdash (notice the missing "@" symbol, it is pulling from github directly).

But the dependencies still need to be clarified.

@unional
Copy link
Author

unional commented Jun 12, 2017

I have turned on Travis already. When there is a new commit, then the travis should start working.

@marshall007
Copy link
Collaborator

@unional I just tried to add these as npm dependencies. There are a couple issues:

  • types/npm-bluebird has no name in package.json and can't be installed
  • types/env-node does not have @types/node as it's name, so I don't think that will work
  • none of my dependencies have their typings dependencies in the package.json, so I don't think installing mine via npm will work anyway

@unional
Copy link
Author

unional commented Jun 12, 2017

sorry, I meant using the @types version of those typings. If they don't work as nice (and for a reason), then we need to propagate down to types/npm-bluebird and types/env-node

@marshall007
Copy link
Collaborator

@unional ah, gotcha. Those two should be fine, but relying on @types/rethinkdb would be problematic. What should we do about that one?

@blakeembrey
Copy link
Member

It's perfectly correct 👍 The thing we're considering is that, with NPM @types, we want to go for a kind of pseudo approach for a bit enabling both typings.json and package.json installs from GitHub. @unional, can you make a PR with the changes you'd like to see?

@marshall007
Copy link
Collaborator

@blakeembrey yea I get what we're trying to do; and that should be fine for bluebird and node, but because of the way I rely on declaration merging for the rethinkdb module, it wouldn't really produce a useful definition if we relied on @types/rethinkdb.

Is there a solution to this? Could we just use a GitHub dependency for types/npm-rethinkdb? I myself would prefer to reference these definitions using NPM, so I hope we can figure something out.

@blakeembrey
Copy link
Member

Could we just use a GitHub dependency for types/npm-rethinkdb?

Absolutely, this is the end goal - allowing people to use from GitHub until microsoft/types-publisher#4 is done. All that's needed to support this should be in https://github.com/types/_guidelines (just add version and name to package.json).

@unional
Copy link
Author

unional commented Jun 14, 2017

@Blakeembery sorry, too busy at work. Didn't get a chance to get to this.

@unional
Copy link
Author

unional commented Jun 14, 2017

.... Embrey! XD

@marshall007
Copy link
Collaborator

@unional @blakeembrey I have a PR up for this (#2), could one of you have a look?

I'm getting a failure on TS v1.8, typings bundle -o bundle.d.ts blows up with ts.getCombinedModifierFlags is not a function, not sure what the expected result is there. If you guys could document anything else that needs to be done, I'll update that PR tonight.

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

No branches or pull requests

3 participants