Giter VIP home page Giter VIP logo

asset-packagist's Introduction

Asset Packagist

Latest Stable Version Total Downloads Build Status Scrutinizer Code Coverage Scrutinizer Code Quality

Composer

Composer + Bower + NPM = friends forever!

This package is the core part of https://asset-packagist.org/ project.

Asset Packagist allows installation of Bower and NPM packages as native Composer packages.

NO plugins and NO Node.js are required.

Installation

You don't need to install anything to use Asset Packagist!

If you want to setup your own version of Asset Packagist please see installation instruction at hiqdev/asset-packagist.dev

Usage

List required packages like the following:

"require": {
    "bower-asset/bootstrap": "^3.3",
    "npm-asset/jquery": "^2.2"
}

And add these lines:

"repositories": [
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
]

More information can be found on about page.

License

This project is released under the terms of the BSD-3-Clause license. Read more here.

Copyright © 2016-2018, HiQDev (http://hiqdev.com/)

Acknowledgments

This project uses Francois Pluchino's composer-asset-plugin to convert Bower and NPM packages to composer format.

asset-packagist's People

Contributors

and800 avatar anyt avatar devthejo avatar edgardmessias avatar githubjeka avatar glaubinix avatar hiqsol avatar samdark avatar silverfire avatar tafid avatar zhuravljov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asset-packagist's Issues

Composer fails to install latest version - only the second-newest works

For the following composer.json will install paste.js version 0.0.20, although 0.0.21 is available.

{
    "require": {
        "bower-asset/paste.js": "^0.0.20"
    },
    "repositories": {
        "asset-packagist": {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
	}
}

Requireing ^0.0.21 will to the following error: "The requested package bower-asset/paste.js ^0.0.21 exists as bower-asset/paste.js[0.0.21, 0.0.20, 0.0.19, 0.0.18, 0.0.16, 0.0.15, 0.0.14, 0.0.13, 0.0.12,0.0.11, 0.0.10, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1, dev-master] but these are rejected by your constraint."

Setting the version to ">=0.0.21" will yield "The requested package bower-asset/paste.js >=0.0.21 is satisfiable by bower-asset/paste.js[dev-master] but these conflict with your requirements or minimum-stability."

I'm pretty sure, it was OK earlier. I'm using composer 1.4.1 and PHP 7 here.

Documentation on switching from fxp/composer-asset-plugin

I already have a ton of stuff installed with fxp/composer-asset-plugin. I added the "repositories" section to my composer.json, but running composer update still tries to use the github API. Is there a way to transition nicely, i.e. make it use the same installed versions as the base without needing to re-install everything for it to use asset-packagist from the start?

Install an asset to a custom path

I had a workflow working to install assets on custom paths but I can't make it work anymore and assets go to vendor/ always.

Here is my composer.json

{
    "name": "oomphinc/composer-test",
    "repositories": [
	{
		"type": "composer",
		"url": "https://asset-packagist.org"
	}
    ],
    "require": {
        "oomphinc/composer-installers-extender": "1.1.2",
        "psr/log": "1.0.2",
        "bower-asset/bootstrap-sass": "3.3.7"
    },
    "extra": {
        "installer-types" : [ "library" ],
        "installer-paths": {
            "otherpath": ["bower-asset/bootstrap-sass"],
            "thispath": ["psr/log"],
            "morepaths": ["type:bower-asset"]
               
        }
    }
} 

The bootstrap-sass always end up in vendor but the psr/log gets installed in a custom path
I also reported it here
oomphinc/composer-installers-extender#6

Have the feeling is because now this repo sets a "type" without a require for composer/installers

https://packagist.org/packages/composer/installers
Here is explained that both things are needed for the custom path to work.

bootstrap-vue Package update failed

Please provide your composer.json if appropriate.

The "bootstrap-vue" package available on npm but

Package update failed
Could you ensure this package exists on npmjs.com?
Think asset-packagist is guilty? Report on GitHub

Can not install npm-asset/mermaid:7.0.5

Running the command

composer require -vvv --no-plugins npm-asset/mermaid:7.0.5

Leads to

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: npm-asset/minimist[0.0.8, 1.2.0].
    - npm-asset/mkdirp 0.5.1 requires npm-asset/minimist 0.0.8 -> satisfiable by npm-asset/minimist[0.0.8].
    - npm-asset/mermaid 7.0.5 requires npm-asset/minimist >=1.2.0,<2.0.0 -> satisfiable by npm-asset/minimist[1.2.0].
    - npm-asset/mermaid 7.0.5 requires npm-asset/mkdirp >=0.5.1,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.1].
    - Installation request for npm-asset/mermaid 7.0.5 -> satisfiable by npm-asset/mermaid[7.0.5].

Within the dependencies of mermaid there are (in a composer sense) incompatible constraints to minimist. npm can "solve" this, by installing multiple versions of a dependency (as a sub-dependency).

Interestingly, you can download a 7.0.5 zip package from here: https://asset-packagist.org/package/npm-asset/mermaid


This is more a informational issue for you as maintainers of asset-packagist, since it's an issue in the way how composer vs. npm works. I fear you (or fxpio/cap) might not be able to do anything about these cases, but they might be noted in the docs.

Feel free to reopen this issue.

High memory usage when using a lot of packages

The package list is from an educational project which tries to include as many Yii2 packages as possible, it might be useful for you as a benchmarking tool.

composer.json

All values with filled caches...

AP

[6694.7MB/310.05s] Dependency resolution completed in 126.371 seconds
[650.9MB/322.22s] Memory usage: 650.91MB (peak: 6698.12MB), time: 322.22s

fxpio/cap (for comparision)

[643.7MB/40.37s] Dependency resolution completed in 3.530 seconds
[377.3MB/33.04s] Memory usage: 377.26MB (peak: 648.26MB), time: 33.04s

Asset Packagist not resolving dependencies

To see the problem create test config

{
    "require": {
        "bower-asset/jquery-ui": "^1.12"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
}

And run composer update without installed "fxp/composer-asset-plugin".
Only jquery-ui v1.12.0.0 will be installed.

Create second config

{
    "require": {
        "bower-asset/jquery-ui": "^1.12"
    }
}

Require "fxp/composer-asset-plugin:^1.2.0" and run composer update.
jquery-ui v1.12.0.1 and jquery v3.1.0 will be installed.

I tried with other bower assets and catch same bug.

Tested with composer 1.2, php 7 on windows 10 and ubuntu on windows and composer 1.2, php 5.6 on debian.

What version of packages used on asset-packagist.org ?

I installed locally from master and also tried hiqsite branch and 0.1.0 tag, but I didn't get same website as on the asset-packagist.org.

Searchbox looks different, I have extra select with Bower and Npm options and also I don't have fancy gear when ajax requests sent, search results looks different too.

What should I use to install same version as used on asset-packagist.org?

Package not found

I am including the following package

bower-asset/scriptaculous-bower

from bower through asset-packagist which used to work since today. Now it gives a message that the package exists but is rejected by composer. I stripped down the composer.json to

{
    "name": "test/test",
    "require": {
        "bower-asset/scriptaculous-bower": "^1.9"
    },
    "repositories": [{
	"type": "composer",
	"url": "https://asset-packagist.org"
    }]
}

When running composer install I am receiving the following error message

The requested package bower-asset/scriptaculous-bower ^1.9 exists as bower-asset/scriptaculous-bower[1.9.0, 1.8.1, dev-master] but these are rejected by your constraint.

This used to work before, if I change the requirement to ^1.8 it works and 1.8.1 is installed. The message is kinda weird because 1.9.0 is present and composer even knows about it.
Not sure if it is a problem with asset-packagist, but nor the original bower package neither the entry at asset-packagist.org have changed lately.

Write installed assets to different folder

Currently all assets are installed in the vendor dir, which is logical.
However, this folder is 'outside' the public folder that our web server serves to the web:

projectDir/vendor/bower-asset/bootstrap //currently
projectDir/public/vendor/bower-assets/bootstrap //preferred

Would this be possible or should this be done 'manually' using a postInstall script?

UPDATE
I had a look at https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md, but that does not allow arbitrary paths, since it might overwrite users folders.

Luckily this extension https://github.com/oomphinc/composer-installers-extender does support it like this:

  "repositories": [
      {
          "type": "composer",
          "url": "https://asset-packagist.org"
      }
  ],
  "require": {
      "oomphinc/composer-installers-extender": "*",
      "bower-asset/bootstrap": "^3.3",
      "npm-asset/jquery": "^2.2"
  },
  "extra": {
     "installer-types": ["library"],
     "installer-paths": {
       "public/assets/{$name}/": ["type:library"]
     }
   }

Queue package update requests

I fetched bower-asset/mocha today and the website was throwing 504 errors for a few minutes while the update was happening. It's much better now that the package has already been fetched once, the update happens in about 5 seconds. The website still won't load for those 5 seconds though.

You should use a job queue and do processing in the background.

file_put_contents permission denied

with the package npm-asset/tap, I get:

PHP Warning 'yii\base\ErrorException' with message 'file_put_contents(/home/sol/prj/hiqdev/asset-packagist.org/web/p/npm-asset/tap/b0f37226924cdc1de25c67330f5327122767cf0d514239e309df5449e34ec09d.json): failed to open stream: Permission denied'

in /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/components/Storage.php:83

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'file_put_conten...', '/home/sol/prj/h...', 83, Array)
#1 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/components/Storage.php(83): file_put_contents('/home/sol/prj/h...', '{"packages":{"n...')
#2 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/models/AssetPackage.php(205): hiqdev\assetpackagist\components\Storage->writePackage(Object(hiqdev\assetpackagist\models\AssetPackage))
#3 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/controllers/SiteController.php(85): hiqdev\assetpackagist\models\AssetPackage->update()
#4 [internal function]: hiqdev\assetpackagist\controllers\SiteController->actionUpdate()
#5 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#6 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#7 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Module.php(454): yii\base\Controller->runAction('update', Array)
#8 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/web/Application.php(84): yii\base\Module->runAction('site/update', Array)
#9 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
#10 /home/sol/prj/hiqdev/asset-packagist.org/web/index.php(8): yii\base\Application->run()
#11 {main}

Use a fork of bower asset

Please provide your composer.json if appropriate.

Hello. How I can require my own fork with this tool? In composer-asset-plugin I could specify

"asset-repositories": [
      {
        "type": "bower-github",
        "url": "https://github.com/CyanoFresh/intro.js",
        "name": "bower-asset/intro.js"
      }
    ]

and it was downloading my fork

Fail to search npm-asset/estree-walker

I got 500 in console for update query. Here is trace

Exception 'Fxp\Composer\AssetPlugin\Exception\InvalidCreateRepositoryException' with message 'The "repository.url" parameter of "estree-walker" npm asset package must be present for create a VCS Repository
If the config comes from the NPM Registry, override the config with a custom Asset VCS Repository' 

in /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/NpmRepository.php:154

Stack trace:
#0 /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/NpmRepository.php(76): Fxp\Composer\AssetPlugin\Repository\NpmRepository->getVcsRepositoryUrl(Array, 'estree-walker')
#1 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/registry/RegistryTrait.php(38): Fxp\Composer\AssetPlugin\Repository\NpmRepository->createVcsRepositoryConfig(Array, 'estree-walker')
#2 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/models/AssetPackage.php(203): hiqdev\assetpackagist\registry\NpmRegistry->buildVcsRepository('estree-walker')
#3 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/controllers/SiteController.php(99): hiqdev\assetpackagist\models\AssetPackage->update()
#4 [internal function]: hiqdev\assetpackagist\controllers\SiteController->actionUpdate()
#5 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#6 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#7 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Module.php(454): yii\base\Controller->runAction('update', Array)
#8 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/web/Application.php(87): yii\base\Module->runAction('site/update', Array)
#9 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
#10 /home/sol/prj/hiqdev/asset-packagist.org/web/index.php(8): yii\base\Application->run()
#11 {main}

Move "yiisoft/yii2-debug" to developments dependencies

Move "yiisoft/yii2-debug" to developments dependencies

From:

    "require": {
        ...
        "yiisoft/yii2-debug": "^2.0",
        ...
    },
    "require-dev": {
        "hiqdev/hidev-php": "<2.0",
        "hiqdev/hidev-hiqdev": "<2.0"
    },

To:

    "require": {
        ...
    },
    "require-dev": {
        "hiqdev/hidev-php": "<2.0",
        "hiqdev/hidev-hiqdev": "<2.0",
        "yiisoft/yii2-debug": "^2.0"
    },

NPM version conflicts & SASS import scoped package problem

1/ Using fxp/composer-asset-plugin, i can Solve the conflicts of asset dependencies, does this repository support it?

2/ When i install individual components package and use scss file, it throw an error
Error: File to import not found or unreadable: @material/button/mdc-button.

All scoped components were installed in vendor named material--<package>, not @material/<package>

My composer.json

"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "~2.0.6",
    "npm-asset/material-components-web": "~0.21.1"
}

Invalid version string "2.1.1.0-patch2.1"

  [RuntimeException]                                                                                                                              
  Could not load package bower-asset/sizzle in https://asset-packagist.org: [UnexpectedValueException] Invalid version string "2.1.1.0-patch2.1"  
                                                                                                                                                  

                                             
  [UnexpectedValueException]                 
  Invalid version string "2.1.1.0-patch2.1"  
                                             

Class 'hiqdev\assetpackagist\components\AssetPackage' not found

Hello again,
I'm trying to make my own asset-packagist service, I got this error and effectively the class definition file doesn't exist

Exception 'Error' with message 'Class 'hiqdev\assetpackagist\components\AssetPackage' not found'

in /var/www/asset-packagist/vendor/hiqdev/asset-packagist/src/console/AssetPackageController.php:48

Stack trace:
#0 /var/www/asset-packagist/vendor/hiqdev/asset-packagist/src/console/AssetPackageController.php(67): hiqdev\assetpackagist\console\AssetPackageController->actionUpdateList('/var/www/asset-...')
#1 [internal function]: hiqdev\assetpackagist\console\AssetPackageController->actionUpdateAll()
#2 /var/www/asset-packagist/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#3 /var/www/asset-packagist/vendor/yiisoft/yii2/base/Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#4 /var/www/asset-packagist/vendor/yiisoft/yii2/console/Controller.php(119): yii\base\Controller->runAction('update-all', Array)
#5 /var/www/asset-packagist/vendor/yiisoft/yii2/base/Module.php(454): yii\console\Controller->runAction('update-all', Array)
#6 /var/www/asset-packagist/vendor/yiisoft/yii2/console/Application.php(176): yii\base\Module->runAction('asset-package/u...', Array)
#7 /var/www/asset-packagist/vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('asset-package/u...', Array)
#8 /var/www/asset-packagist/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))

asset-packagist conflicts with fxpio/composer-asset-plugin

My composer plugins:

> composer global show
Changed current directory to /Users/tobias/.composer
fxp/composer-asset-plugin v1.4.1 NPM/Bower Dependency Manager for Composer

Problematic composer.json

{
    "require": {
        "dmstr/yii2-adminlte-asset": ">=2.0"
    },
    "repositories": [
      {
        "type": "composer",
        "url": "https://asset-packagist.org"
      }
    ]
}

Running

composer update -vvv

fails.

Running

composer update -vvv --no-plugins

works.

What also works is this:

{
    "require": {
        "dmstr/yii2-adminlte-asset": ">=2.0"
    }
}

The error

Adding VCS repository bower-asset/eve
Executing command (CWD): git clone --mirror 'https://github.com/DmitryBaranovskiy/eve.git' '/Users/tobias/.composer/cache/vcs/https---github.com-DmitryBaranovskiy-eve.git/'
Executing command (CWD): git clone --mirror '[email protected]:DmitryBaranovskiy/eve.git' '/Users/tobias/.composer/cache/vcs/https---github.com-DmitryBaranovskiy-eve.git/'
Executing command (CWD): git --version

                                                                                                                                         
  [Composer\Repository\InvalidRepositoryException]                                                                                       
  No valid bower.json was found in any branch or tag of https://github.com/DmitryBaranovskiy/eve.git, could not load a package from it.                          

In version 2.0 of my package I had included bower-asset/admin-lte this was moved to a composer package from 2.1 on.

I can't really say why this is happening, but it's a strange edge case, when having ap and c-a-p running together.

See also

CC: @francoispluchino @samdark @cebe

Improve search

Rework the search page to show multiple packages by search.

For bower, use the search method in BowerRepository
For npm, implement npms in NpmRegistry

For search field, we can use Buttons with dropdowns, but using the selec field instead of the button.

Package update failed: npm-asset/bootstrap-datepicker

I actually tried to install AdminLTE via npm

> composer require -vv --no-plugins npm-asset/admin-lte 
Using version dev-master for npm-asset/admin-lte
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.069 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for npm-asset/admin-lte dev-master -> satisfiable by npm-asset/admin-lte[dev-master].
    - npm-asset/admin-lte dev-master requires npm-asset/bootstrap-datepicker >=1.7.0,<2.0.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

So I looked up the missing package on ap: https://asset-packagist.org/package/search?query=bootstrap-datepicker&platform=bower%2Cnpm

But ap shows (https://asset-packagist.org/package/npm-asset/bootstrap-datepicker)

npm-asset/bootstrap-datepicker see on Npm
Fetch updates from Npm
Package update failed
Could you ensure this package exists on npmjs.com?

Think asset-packagist is guilty? Report on GitHub

And the package exists on npm, see https://www.npmjs.com/package/bootstrap-datepicker - I thought you're "guilty" ;)

PS: I would be really interested in the underlying issue here, since I fear a lot of problems coming up when using more and more npm packages. (see also yiisoft/yii2#14297)

Provide separate URLs for bower and npm assets

Could you provide separate URLs for bower and npm assets?

The background is that, while composer and bower work in a similar way concerning flat-installation of dependencies, npm works completely different. See details

This might (will) lead to other solutions regarding management of npm packages, ie. fxpio/foxy#8 - while using asset-packagist for bower still is a very practical solution.

By having separate URLs developers could choose freely which service they use for which packages.

not found error with npm existing package

with npm-asset/babel-generator I get e not found error,
but the library actually exists in npm

Exception 'RuntimeException' with message 'Failed to execute git clone --mirror 'https://_:[email protected]/babel/babel/tree/master/packages/babel-generator.git' '/var/www/.composer/cache/vcs/git-github.com-babel-babel-tree-master-packages-babel-generator.git/'

Cloning into bare repository '/var/www/.composer/cache/vcs/git-github.com-babel-babel-tree-master-packages-babel-generator.git'...
fatal: repository 'https://_:[email protected]/babel/babel/tree/master/packages/babel-generator.git/' not found
'

in /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Util/Git.php:272

Stack trace:
#0 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Util/Git.php(195): Composer\Util\Git->throwException('Failed to execu...', '[email protected]:...')
#1 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/Vcs/GitDriver.php(81): Composer\Util\Git->runCommand(Object(Closure), '[email protected]:...', NULL, true)
#2 /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/Vcs/GitHubDriver.php(149): Composer\Repository\Vcs\GitDriver->initialize()
#3 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php(433): Fxp\Composer\AssetPlugin\Repository\Vcs\GitHubDriver->setupGitDriver('[email protected]:...')
#4 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php(312): Composer\Repository\Vcs\GitHubDriver->attemptCloneFallback()
#5 /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/Vcs/AbstractGitHubDriver.php(62): Composer\Repository\Vcs\GitHubDriver->getContents('https://api.git...', true)
#6 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php(405): Fxp\Composer\AssetPlugin\Repository\Vcs\AbstractGitHubDriver->getContents('https://api.git...', true)
#7 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php(64): Composer\Repository\Vcs\GitHubDriver->fetchRootIdentifier()
#8 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/VcsRepository.php(91): Composer\Repository\Vcs\GitHubDriver->initialize()
#9 /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetVcsRepository.php(121): Composer\Repository\VcsRepository->getDriver()
#10 /home/sol/prj/hiqdev/asset-packagist.org/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php(39): Fxp\Composer\AssetPlugin\Repository\AbstractAssetVcsRepository->initDriver()
#11 /home/sol/prj/hiqdev/asset-packagist.org/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php(181): Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initialize()
#12 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/models/AssetPackage.php(215): Composer\Repository\ArrayRepository->getPackages()
#13 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/models/AssetPackage.php(204): hiqdev\assetpackagist\models\AssetPackage->prepareReleases(Object(Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository))
#14 /home/sol/prj/hiqdev/asset-packagist.org/vendor/hiqdev/asset-packagist/src/controllers/SiteController.php(85): hiqdev\assetpackagist\models\AssetPackage->update()
#15 [internal function]: hiqdev\assetpackagist\controllers\SiteController->actionUpdate()
#16 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#17 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#18 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Module.php(454): yii\base\Controller->runAction('update', Array)
#19 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/web/Application.php(84): yii\base\Module->runAction('site/update', Array)
#20 /home/sol/prj/hiqdev/asset-packagist.org/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
#21 /home/sol/prj/hiqdev/asset-packagist.org/web/index.php(8): yii\base\Application->run()
#22 {main}

Custom paths don't seem to work

I have set up my composer.json with Asset Packagist and oomphinc/composer-installers-extender, and then required bower-asset/dropzone after setting a custom install path for it. It stubbornly insists on going into vendor/bower-asset/dropzone. I'm not sure what I did wrong. How might I go about debugging this? Has anyone else had problems getting custom paths to work?

Patch Version

It seems like that a constraint like ~1.6.0 for angular will install the latest patch version v1.6.7-patch5468 instead of 1.6.6 (which is the latest version)

The fxp plugin therefore had an option to disable patch version:

"fxp-asset": {
     "pattern-skip-version": "(-build|-patch)"
}

Is there something similar?

Please provide your composer.json if appropriate.

{
    "name" : "luyadev/luya-module-admin",
    "description" : "Administration core module for all LUYA admin modules",
    "type" : "luya-core",
    "license": "MIT",
    "homepage" : "http://luya.io",
    "require" : {
        "yiisoft/yii2-imagine": "~2.1.0",
        "flowjs/flow-php-server": "^1.0"
    },
    "require-dev" : {
	"luyadev/luya-core" : "^1.0@dev",
	"luyadev/luya-testsuite" : "^1.0@dev",
	"luyadev/luya-module-cms" : "^1.0@dev",
	"php-coveralls/php-coveralls": "^1.0",
	"twbs/bootstrap": "v4.0.0-beta",
	"bower-asset/angular" : "1.6.5",
	"bower-asset/angular-loading-bar" : "^0.9",
	"bower-asset/angular-slugify" : "^1.0.0",
	"bower-asset/angularjs-datepicker" : "^2.1.0",
	"bower-asset/ui-router" : "~0.4.0",
	"bower-asset/ng-file-upload" : "~12.2.0",
	"bower-asset/ng-flow" : "~2.7.0",
	"bower-asset/ng-wig" : "~3.0.0",
	"bower-asset/twigjs-bower": "~0.10.5",
	"bower-asset/angular-filter" : "~0.5.15"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.0.x-dev"
        }
    },
    "config": {
        "platform": {"php": "7.0"}
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
}

http error 500 fetching npm package

Hello,
on fetching npm-asset/color-name (on https://asset-packagist.org/), and with some others npm librairies I get an http error 500 on the xhr request https://asset-packagist.org/site/update

here is the returned error:

Exception 'RuntimeException' with message 'Failed to execute git clone --mirror 'git+ssh://[email protected]/harthur/color-string.git' '/var/www/.composer/cache/vcs/git-ssh---git-github.com-harthur-color-string.git/'

Cloning into bare repository '/var/www/.composer/cache/vcs/git-ssh---git-github.com-harthur-color-string.git'...
Could not create directory '/var/www/.ssh'.
Host key verification failed.
fatal: Could not read from remote repository.

Having trouble with gulp installation

First of all, this is a great approach and I'm looking forward to getting all this included in my Drupal projects.

Currently I'm having trouble installing gulp and I saw the other issues here in the queue that I have to fetch missing packages on the web UI manually to get the missing dependencies resolved. I understand that I went through all that step by step. But I couldn't get it to work as I ended up with unresolvable dependencies. This is probably a misleading error from composer and what's really the case is probably just one more missing package that I couldn't find.

When I install gulp with NPM I end up with over 300 packages on the top level. But all the dependencies can be resolved.

My requirements are these:

    "npm-asset/gulp": "^3.9.1",
    "npm-asset/gulp-if": "^2.0.0",
    "npm-asset/gulp-notify": "^2.2.0",
    "npm-asset/gulp-sass": "^2.0.5",
    "npm-asset/gulp-sourcemaps": "^1.6.0",
    "npm-asset/minimist": "^1.2.0",

Any idea on how I could that sorted?

Unable to install scoped packages

composer require npm-asset/@twinscom/uploader-client

fails with the following message:

[InvalidArgumentException]                                                                                                                 
  Could not find package npm-asset/@twinscom/uploader-client at any version for your minimum-stability (stable). Check the package spelling  
   or your minimum-stability

The package version is 1.0.0 and the package's repository has tag v1.0.0.

My composer.json:

{
    "name": "my-app",
    "description": "My app",
    "type": "project",
    "minimum-stability": "stable",

    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ],

    "require": {
        "php": ">=7.1.0"
    }
}

Update
The package's page on npmjs.com: https://www.npmjs.com/package/@twinscom/uploader-client

Composer search doesn't work

In case when asset-packagist.org added as repository to ~/.composer/config.json search commands doesn't work

$ composer require
Search for a package: yiisoft
  [Composer\Downloader\TransportException]                                                                       
  The "https://asset-packagist.org/search.json?q=yiisoft" file could not be downloaded (HTTP/1.1 404 Not Found)

SSL certificate expired for https://asset-packagist.org/packages.json

Please provide your composer.json if appropriate.

I am getting following error, because the ssl certificate is expired and not renewed.

The "https://asset-packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed


On google chrome, In certificate viewer, the certificated is expired. It should have been renewed.

Issued On Monday, 9 October 2017 at 19:15:36
Expires On Sunday, 7 January 2018 at 19:15:36

"ignore" section in bower.json is ignored

Files from bower's "ignore" section are not ignoring.

For example Bootstrap 3 bower.json has:

{

  "ignore": [
    "/.*",
    "_config.yml",
    "CNAME",
    "composer.json",
    "CONTRIBUTING.md",
    "docs",
    "js/tests",
    "test-infra"
  ],

}

After composer install (or composer update) we have files in "vendor/bower-asset/bootstrap":

with fxp/composer-asset-plugin:

dist/
fonts/
grunt/
js/
less/
nuget/
Gemfile
LICENSE
Gruntfile.js
package.js
bower.json
package.json
Gemfile.lock
CHANGELOG.md
ISSUE_TEMPLATE.md
README.md

Folder size 2.17 MiB

with asset-packagist:

dist/
docs/
fonts/
grunt/
js/
less/
nuget/
.editorconfig
.gitattributes
.gitignore
CNAME
Gemfile
LICENSE
Gruntfile.js
package.js
bower.json
composer.json
package.json
Gemfile.lock
CHANGELOG.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
README.md
.hound.yml
.travis.yml
_config.yml

Folder size 11.05 MiB

As result my folder bower-asset with all packages has 40.22 MiB instead 10.86 MiB.

Assets installable only after manual web fetch

I'm trying to install update some assets via npm-asset notation. I.e I take nestedSortable package from NPM. I add "npm-asset/nestedSortable":"*" to the composer.json, do composer update and receive

  Problem 1
    - The requested package npm-asset/nestedsortable could not be found in any version, there may be a typo in the package name.

Packagist repository is added according to manual.

Then I go to https://asset-packagist.org/site/search?query=npm-asset%2FnestedSortable to check the package exist. The site fetch me versions successfully. After this I do composer update again.

And all works (no code or composer changes)

  - Installing npm-asset/nestedsortable (2.0.0.0)
    Downloading: Connecting...������������������������������    Downloading: 100%         ���������

And repeats when I take other package.

Looks like some packagist caching problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.