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

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

@bradleyayers

Description

@bradleyayers

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions