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

Packages with a / in the name don't work. #134

Open
bradleyayers opened this issue Mar 26, 2015 · 1 comment
Open

Packages with a / in the name don't work. #134

bradleyayers opened this issue Mar 26, 2015 · 1 comment

Comments

@bradleyayers
Copy link

If I have a package named company/my-package, tsd does not like it:

$ ./node_modules/.bin/tsd reinstall

-> running reinstall
path not in index, attempt-adding: company/my-package.d.ts

-> an error occured!

Cannot read property 'commit' of null
TypeError: Cannot read property 'commit' of null
    at ContentLoader.loadContent (/Users/brad/company/my-package/node_modules/tsd/build/tsd/logic/ContentLoader.js:44:63)
    at /Users/brad/company/my-package/node_modules/tsd/build/tsd/logic/Installer.js:75:39
    at tryCatch1 (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/util.js:63:19)
    at Promise$_callHandler [as _callHandler] (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/promise.js:695:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/promise.js:711:18)
    at Promise$_settlePromiseAt [as _settlePromiseAt] (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/promise.js:868:14)
    at Promise$_settlePromises [as _settlePromises] (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/promise.js:1006:14)
    at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/async.js:74:12)
    at Async$consumeFunctionBuffer (/Users/brad/company/my-package/node_modules/tsd/node_modules/bluebird/js/main/async.js:37:14)
    at process._tickCallback (node.js:355:11)

In my tsd.json I have:

{
  "version": "v4",
  "repo": "bradleyayers/DefinitelyTyped",
  "ref": "master",
  "path": "typings",
  "bundle": "typings/tsd.d.ts",
  "installed": {
    "company/my-package/my-package.d.ts": {
      "commit": "fda66b9a46152725dff5fa0efc0884b6a104744d"
    }
  }
}

Do we want to add support for these types of packages? In my case I've got a bunch of smaller projects that I want to share definition files between them. They're published on NPM under a scope @company, so for example I would do npm install @company/my-package.

@blakeembrey
Copy link
Member

@bradleyayers Yes, I think this is something that should be supported. I'm going to be looking into and proposing some updates soon, so I'll keep you posted as I work on this.

@blakeembrey blakeembrey mentioned this issue May 1, 2015
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants