How do I convert a Drush make commit-level dependency into Composer? I am remaking old project to use composer for building and I have a problem I cannot find solution to. Basically this is how library is defined in profile.make file:

; HybridAuth
libraries[hybridauth][directory_name] = 'hybridauth'
libraries[hybridauth][type] = 'library'
libraries[hybridauth][download][type] = 'git'
libraries[hybridauth][download][url] = 'https://github.com/hybridauth/hybridauth.git'
libraries[hybridauth][download][revision] = 'd4e5bc34008e8c187c302eb4e94200ee4a208c63'


How should I rewrite it correctly in my composer.json file? To be precise, how to get revision? This is what I have so far:

{
      "type": "package",
      "package": {
        "name": "library/hybridauth",
        "version": "d4e5bc34008e8c187c302eb4e94200ee4a208c63",
        "type": "drupal-library",
        "dist": {
          "url": "https://github.com/hybridauth/hybridauth.git",
          "type": "git"
        }
      }
    },


it is complaining about my "version" line:

  [Composer\Repository\InvalidRepositoryException]                             
  A repository of type "package" contains an invalid package definition: Inva  
  lid package information:                                                     
  version : invalid value (d4e5bc34008e8c187c302eb4e94200ee4a208c63): Invalid  
   version string "d4e5bc34008e8c187c302eb4e94200ee4a208c63"                   
  Invalid package definition:                                                  
  {"name":"library\/hybridauth","version":"d4e5bc34008e8c187c302eb4e94200ee4a  
  208c63","type":"drupal-library","dist":{"url":"https:\/\/github.com\/hybrid  
  auth\/hybridauth.git","type":"git"}}
The location you're defining it at is wrong. When defining your own packages, the version tag is used to target branches or tags. If you want specify a commit-level project requirement, do it in require object where you're specifying your requirement in the  dev-${BRANCH}#${COMMIT_HASH} format.

In repositories:

{
  "type": "package",
  "package": {
    "name": "hybridauth/hybridauth",
    "version": "master",
    "type": "drupal-library",
    "source": {
      "url": "https://github.com/hybridauth/hybridauth",
      "type": "git",
      "reference": "master"
    }
  }


In require:

"hybridauth/hybridauth": "dev-master#38f0735",