angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.54k stars 3k forks source link

All angular-ui-router bower release components missing #3561

Closed mbargeron closed 6 years ago

mbargeron commented 6 years ago

This is a:

My version of UI-Router is: anything > 1.0.3

Bug Report

Current Behavior:

I'm not sure bower versions of angular-ui-router are still supported. I know that yarn (yet another repository nightmare :) is taking its place for whatever reason, but we haven't moved to yarn as an organization.

So for those of us still using bower for legacy projects, it would be nice to be able to download the latest through bower. The problem is that none of the angular-ui-router release components are available when the version is set > 1.0.3 in bower.json.

Steps to reproduce:

  1. Create a bower project that includes "angular-ui-router": "=1.0.4" (pulls from git://github.com/angular-ui/ui-router.git#1.0.4).
  2. Run "bower update" from the command line.
  3. Open "bower_components/angular-ui-router" in a file manager.
  4. Notice that there is a "migrate" directory with an npm "migratewarn.js", but no release directory where angular-ui-router.js normally resides. Dunno why seemingly the npm version is being downloaded from the bower repository.
  5. Follow the warning and change the bower package to "(at)uirouter/angularjs" to no avail.
  6. Try changing the bower package to "ui-router" and notice that the same basic problem exists.

Expected Behavior:

To be able to specify the ui-router version in bower.json and have the full functionality of the library available.

I compared the 1.0.11 version from npm vs. bower and there are obvious omissions in the bower version:

UiRouter_Npm_v_Bower.zip

christopherthielen commented 6 years ago

Thanks for the great bug report.

I'm not sure bower versions of angular-ui-router are still supported.

They are! We don't intend to drop support for bower.

I know that yarn (yet another repository nightmare :) is taking its place for whatever reason

To clarify, we recommend people use the packages published to the npm registry (yarn or npm package managers are both fine, and we use yarn when developing ui-router). In fact, bower itself recommends using something other than bower.

Steps to reproduce: Create a bower project that includes "angular-ui-router": "=1.0.4" (pulls from git://github.com/angular-ui/ui-router.git#1.0.4).

This is the main problem. We don't commit the release artifacts to angular-ui/ui-router. They are published to a separate repository which bower should be using. The angular-ui-router bower package is updated on the registry to point to the angular-ui-router-bower git repository. You should find out why bower is fetching from angular-ui/ui-router.

screen shot 2017-12-19 at 8 09 51 pm

I ran your reproduce instructions and see all the release files:

bash-3.2$ bower init
? name t
? description
? main file
? keywords
? authors Chris Thielen <cthielen@netflix.com>
? license MIT
? homepage
? set currently installed components as dependencies? Yes
? add commonly ignored files to ignore list? Yes
? would you like to mark this package as private which prevents it from being accidentally published to the registry? No

{
  name: 't',
  authors: [
    'Chris Thielen <cthielen@netflix.com>'
  ],
  description: '',
  main: '',
  license: 'MIT',
  homepage: '',
  ignore: [
    '**/.*',
    'node_modules',
    'bower_components',
    'test',
    'tests'
  ]
}

? Looks good? Yes
bash-3.2$ bower install --save angular-ui-router#1.0.4
bower angular-ui-router#1.0.4   cached https://github.com/angular-ui/angular-ui-router-bower.git#1.0.4
bower angular-ui-router#1.0.4 validate 1.0.4 against https://github.com/angular-ui/angular-ui-router-bower.git#1.0.4
bower angular#>= 1.2.0          cached https://github.com/angular/bower-angular.git#1.6.7
bower angular#>= 1.2.0        validate 1.6.7 against https://github.com/angular/bower-angular.git#>= 1.2.0
bower angular-ui-router#1.0.4  install angular-ui-router#1.0.4
bower angular#>= 1.2.0         install angular#1.6.7

angular-ui-router#1.0.4 bower_components/angular-ui-router
└── angular#1.6.7

angular#1.6.7 bower_components/angular
bash-3.2$ ls bower_components/angular-ui-router/release/
angular-ui-router.js        angular-ui-router.min.js.map    resolveService.min.js       stateEvents.js.map      ui-router-angularjs.js      ui-router-angularjs.min.js.map
angular-ui-router.js.map    resolveService.js       resolveService.min.js.map   stateEvents.min.js      ui-router-angularjs.js.map
angular-ui-router.min.js    resolveService.js.map       stateEvents.js          stateEvents.min.js.map      ui-router-angularjs.min.js
bash-3.2$

This is working as expected, AFAICT.