зеркало из https://github.com/mozilla/treeherder.git
Bug 1364888 - Upgrade to AngularJS 1.6
The previous commit switched us away from the deprecated `$http` callback methods, meaning the only other breaking change that affects us is the `hashPrefix` change, which we revert by manually setting it back to the empty string, so that existing URLs still work: https://docs.angularjs.org/guide/migration#commit-aa077e8 For more details, see: https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6 https://github.com/angular/angular.js/blob/master/CHANGELOG.md#160-rainbow-tsunami-2016-12-08 Closes #3044.
This commit is contained in:
Родитель
27e516ff4e
Коммит
3ada44e019
10
package.json
10
package.json
|
@ -12,13 +12,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"ajv": "5.5.2",
|
||||
"angular": "1.5.11",
|
||||
"angular": "1.6.8",
|
||||
"angular-clipboard": "1.6.2",
|
||||
"angular-local-storage": "0.7.1",
|
||||
"angular-marked": "1.2.2",
|
||||
"angular-resource": "1.5.11",
|
||||
"angular-route": "1.5.11",
|
||||
"angular-sanitize": "1.5.11",
|
||||
"angular-resource": "1.6.8",
|
||||
"angular-route": "1.6.8",
|
||||
"angular-sanitize": "1.6.8",
|
||||
"angular-toarrayfilter": "1.0.3",
|
||||
"angular-ui-router": "0.4.3",
|
||||
"angular1-ui-bootstrap4": "2.4.22",
|
||||
|
@ -57,7 +57,7 @@
|
|||
"taskcluster-client": "2.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "1.5.11",
|
||||
"angular-mocks": "1.6.8",
|
||||
"enzyme": "3.3.0",
|
||||
"enzyme-adapter-react-16": "1.1.1",
|
||||
"jasmine-core": "2.8.0",
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
var failureViewerApp = angular.module('failureviewer', ['treeherder']);
|
||||
|
||||
failureViewerApp.config(['$compileProvider', function ($compileProvider) {
|
||||
failureViewerApp.config(['$compileProvider', '$locationProvider',
|
||||
function ($compileProvider, $locationProvider) {
|
||||
// Disable debug data, as recommended by https://docs.angularjs.org/guide/production
|
||||
$compileProvider.debugInfoEnabled(false);
|
||||
|
||||
// Revert to the legacy Angular <=1.5 URL hash prefix to save breaking existing links:
|
||||
// https://docs.angularjs.org/guide/migration#commit-aa077e8
|
||||
$locationProvider.hashPrefix('');
|
||||
}]).run(require('./cache-templates'));
|
||||
|
||||
module.exports = failureViewerApp;
|
||||
|
|
|
@ -2,11 +2,15 @@
|
|||
|
||||
var logViewerApp = angular.module('logviewer', ['treeherder']);
|
||||
|
||||
logViewerApp.config(['$compileProvider', '$resourceProvider',
|
||||
function ($compileProvider, $resourceProvider) {
|
||||
logViewerApp.config(['$compileProvider', '$locationProvider', '$resourceProvider',
|
||||
function ($compileProvider, $locationProvider, $resourceProvider) {
|
||||
// Disable debug data, as recommended by https://docs.angularjs.org/guide/production
|
||||
$compileProvider.debugInfoEnabled(false);
|
||||
|
||||
// Revert to the legacy Angular <=1.5 URL hash prefix to save breaking existing links:
|
||||
// https://docs.angularjs.org/guide/migration#commit-aa077e8
|
||||
$locationProvider.hashPrefix('');
|
||||
|
||||
// Don't strip trailing slashes from calculated URLs
|
||||
$resourceProvider.defaults.stripTrailingSlashes = false;
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
// configure the router here, after we have defined all the controllers etc
|
||||
perf.config(['$compileProvider', '$httpProvider', '$stateProvider', '$urlRouterProvider',
|
||||
function ($compileProvider, $httpProvider, $stateProvider, $urlRouterProvider) {
|
||||
perf.config(['$compileProvider', '$locationProvider', '$httpProvider', '$stateProvider', '$urlRouterProvider',
|
||||
function ($compileProvider, $locationProvider, $httpProvider, $stateProvider, $urlRouterProvider) {
|
||||
// Disable debug data, as recommended by https://docs.angularjs.org/guide/production
|
||||
$compileProvider.debugInfoEnabled(false);
|
||||
|
||||
// Revert to the legacy Angular <=1.5 URL hash prefix to save breaking existing links:
|
||||
// https://docs.angularjs.org/guide/migration#commit-aa077e8
|
||||
$locationProvider.hashPrefix('');
|
||||
|
||||
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
|
||||
$httpProvider.defaults.xsrfCookieName = 'csrftoken';
|
||||
$httpProvider.useApplyAsync(true);
|
||||
|
|
|
@ -5,13 +5,17 @@ var treeherderApp = angular.module('treeherder.app',
|
|||
'mc.resizer', 'angular-toArrayFilter', 'react',
|
||||
'hc.marked']);
|
||||
|
||||
treeherderApp.config(['$compileProvider', '$routeProvider', '$httpProvider',
|
||||
treeherderApp.config(['$compileProvider', '$locationProvider', '$routeProvider', '$httpProvider',
|
||||
'$logProvider', '$resourceProvider', 'localStorageServiceProvider',
|
||||
function ($compileProvider, $routeProvider, $httpProvider, $logProvider,
|
||||
function ($compileProvider, $locationProvider, $routeProvider, $httpProvider, $logProvider,
|
||||
$resourceProvider, localStorageServiceProvider) {
|
||||
// Disable debug data, as recommended by https://docs.angularjs.org/guide/production
|
||||
$compileProvider.debugInfoEnabled(false);
|
||||
|
||||
// Revert to the legacy Angular <=1.5 URL hash prefix to save breaking existing links:
|
||||
// https://docs.angularjs.org/guide/migration#commit-aa077e8
|
||||
$locationProvider.hashPrefix('');
|
||||
|
||||
// Don't strip trailing slashes from calculated URLs
|
||||
$resourceProvider.defaults.stripTrailingSlashes = false;
|
||||
|
||||
|
|
30
yarn.lock
30
yarn.lock
|
@ -116,21 +116,21 @@ angular-marked@1.2.2:
|
|||
dependencies:
|
||||
marked "^0.3.3"
|
||||
|
||||
angular-mocks@1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.5.11.tgz#a0e1dd0ea55fd77ee7a757d75536c5e964c86f81"
|
||||
angular-mocks@1.6.8:
|
||||
version "1.6.8"
|
||||
resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.6.8.tgz#ba2120057b4edaa56492d8789ddfbc8f18afa3c5"
|
||||
|
||||
angular-resource@1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/angular-resource/-/angular-resource-1.5.11.tgz#d93ea619184a2e0ee3ae338265758363172929f0"
|
||||
angular-resource@1.6.8:
|
||||
version "1.6.8"
|
||||
resolved "https://registry.yarnpkg.com/angular-resource/-/angular-resource-1.6.8.tgz#cc2172f8ec4a3a8340c43c600a5fed543e4168af"
|
||||
|
||||
angular-route@1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/angular-route/-/angular-route-1.5.11.tgz#49614f3a167f54291e449fe8ba05d39c58924b83"
|
||||
angular-route@1.6.8:
|
||||
version "1.6.8"
|
||||
resolved "https://registry.yarnpkg.com/angular-route/-/angular-route-1.6.8.tgz#82ace773e7b232bf77768370760244a8caab5d36"
|
||||
|
||||
angular-sanitize@1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/angular-sanitize/-/angular-sanitize-1.5.11.tgz#ebfb3f343e543f9b2ef050fb4c2e9ee048d1772f"
|
||||
angular-sanitize@1.6.8:
|
||||
version "1.6.8"
|
||||
resolved "https://registry.yarnpkg.com/angular-sanitize/-/angular-sanitize-1.6.8.tgz#68175a1a5853a6439fffcb251a88a538a44a8e70"
|
||||
|
||||
angular-toarrayfilter@1.0.3:
|
||||
version "1.0.3"
|
||||
|
@ -146,11 +146,7 @@ angular1-ui-bootstrap4@2.4.22:
|
|||
version "2.4.22"
|
||||
resolved "https://registry.yarnpkg.com/angular1-ui-bootstrap4/-/angular1-ui-bootstrap4-2.4.22.tgz#378697405c957b96f947f42322f36660cd3fc88d"
|
||||
|
||||
angular@1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/angular/-/angular-1.5.11.tgz#8c5ba7386f15965c9acf3429f6881553aada30d6"
|
||||
|
||||
angular@^1.0.8:
|
||||
angular@1.6.8, angular@^1.0.8:
|
||||
version "1.6.8"
|
||||
resolved "https://registry.yarnpkg.com/angular/-/angular-1.6.8.tgz#5be378a58be91a5489e78b59c4518cd9fd273ffb"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче