Skip to content

Commit 4b8282c

Browse files
committed
chore(depends): updating all dev dependencies
- Rewrite Karma config to comply with new semantics - Trick JSHint into validating 'abstract' hash keys in ES-compliant way - Fixes #585
1 parent 516a9a1 commit 4b8282c

File tree

3 files changed

+66
-64
lines changed

3 files changed

+66
-64
lines changed

config/karma.js

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,66 @@
11
// Testacular configuration file
2+
module.exports = function (karma) {
3+
karma.set({
4+
// base path, that will be used to resolve files and exclude
5+
basePath: '..',
26

3-
// base path, that will be used to resolve files and exclude
4-
basePath = '..';
7+
frameworks: ['jasmine'],
58

6-
// list of files / patterns to load in the browser
7-
files = [
8-
JASMINE,
9-
JASMINE_ADAPTER,
10-
'lib/angular-1.1.5.js',
11-
'test/lib/angular-mocks-1.1.5.js',
12-
'test/testUtils.js',
9+
// list of files / patterns to load in the browser
10+
files: [
11+
'lib/angular-1.1.5.js',
12+
'test/lib/angular-mocks-1.1.5.js',
13+
'test/testUtils.js',
1314

14-
'src/common.js',
15-
'src/resolve.js',
16-
'src/templateFactory.js',
17-
'src/urlMatcherFactory.js',
18-
'src/urlRouter.js',
19-
'src/view.js',
20-
'src/state.js',
21-
'src/viewDirective.js',
22-
'src/stateDirectives.js',
23-
'src/stateFilters.js',
24-
'src/compat.js',
15+
'src/common.js',
16+
'src/resolve.js',
17+
'src/templateFactory.js',
18+
'src/urlMatcherFactory.js',
19+
'src/urlRouter.js',
20+
'src/view.js',
21+
'src/state.js',
22+
'src/viewDirective.js',
23+
'src/stateDirectives.js',
24+
'src/stateFilters.js',
25+
'src/compat.js',
2526

26-
'test/*Spec.js',
27-
// 'test/compat/matchers.js',
28-
// 'test/compat/*Spec.js',
29-
];
27+
'test/*Spec.js',
28+
// 'test/compat/matchers.js',
29+
// 'test/compat/*Spec.js',
30+
],
3031

31-
// list of files to exclude
32-
exclude = [];
32+
// list of files to exclude
33+
exclude: [],
3334

34-
// use dots reporter, as travis terminal does not support escaping sequences
35-
// possible values: 'dots' || 'progress'
36-
reporter = 'dots';
35+
// use dots reporter, as travis terminal does not support escaping sequences
36+
// possible values: 'dots' || 'progress'
37+
reporters: 'dots',
3738

38-
// these are default values, just to show available options
39+
// these are default values, just to show available options
3940

40-
// web server port
41-
port = 8080;
41+
// web server port
42+
port: 8080,
4243

43-
// enable / disable colors in the output (reporters and logs)
44-
colors = true;
44+
// enable / disable colors in the output (reporters and logs)
45+
colors: true,
4546

46-
// level of logging
47-
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
48-
logLevel = LOG_DEBUG;
47+
// level of logging
48+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
49+
logLevel: karma.LOG_DEBUG,
4950

50-
// enable / disable watching file and executing tests whenever any file changes
51-
autoWatch = false;
51+
// enable / disable watching file and executing tests whenever any file changes
52+
autoWatch: false,
5253

53-
// polling interval in ms (ignored on OS that support inotify)
54-
autoWatchInterval = 0;
55-
56-
// Start these browsers, currently available:
57-
// - Chrome
58-
// - ChromeCanary
59-
// - Firefox
60-
// - Opera
61-
// - Safari
62-
// - PhantomJS
63-
browsers = [ 'PhantomJS' ];
54+
// polling interval in ms (ignored on OS that support inotify)
55+
autoWatchInterval: 0,
6456

57+
// Start these browsers, currently available:
58+
// - Chrome
59+
// - ChromeCanary
60+
// - Firefox
61+
// - Opera
62+
// - Safari
63+
// - PhantomJS
64+
browsers: [ 'PhantomJS' ]
65+
})
66+
};

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@
3838
"dependencies": {},
3939
"devDependencies": {
4040
"grunt": "~0.4.1",
41-
"grunt-contrib-concat": "~0.1.3",
42-
"grunt-contrib-uglify": "~0.2.0",
43-
"grunt-contrib-jshint": "~0.3.0",
44-
"grunt-contrib-watch": "~0.3.1",
45-
"grunt-contrib-connect": "~0.2.0",
46-
"grunt-contrib-clean": "~0.4.0",
47-
"grunt-karma": "~0.4.3",
48-
"jsdoc": "git://github.com/jsdoc3/jsdoc.git#v3.1.1",
49-
"shelljs": "~0.1.4",
41+
"grunt-contrib-concat": "~0.3.0",
42+
"grunt-contrib-uglify": "~0.2.7",
43+
"grunt-contrib-jshint": "~0.7.1",
44+
"grunt-contrib-watch": "~0.5.3",
45+
"grunt-contrib-connect": "~0.5.0",
46+
"grunt-contrib-clean": "~0.5.0",
47+
"grunt-karma": "~0.6.2",
48+
"jsdoc": "git://github.com/jsdoc3/jsdoc.git#v3.2.2",
49+
"shelljs": "~0.2.6",
5050
"faithful-exec": "~0.1.0",
5151
"karma-firefox-launcher": "~0.1.0",
5252
"karma-chrome-launcher": "~0.1.0",
5353
"karma-html2js-preprocessor": "~0.1.0",
54-
"karma-jasmine": "~0.1.0",
54+
"karma-jasmine": "~0.1.3",
5555
"karma-requirejs": "~0.1.0",
5656
"karma-script-launcher": "~0.1.0",
5757
"karma-coffee-preprocessor": "~0.1.0",
58-
"karma": "~0.10.1",
58+
"karma": "~0.10.4",
5959
"karma-phantomjs-launcher": "~0.1.0",
6060
"load-grunt-tasks": "~0.2.0",
6161
"grunt-conventional-changelog": "~1.0.0"

src/state.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider', '$locationProvider'];
22
function $StateProvider( $urlRouterProvider, $urlMatcherFactory, $locationProvider) {
33

4-
var root, states = {}, $state, queue = {};
4+
var root, states = {}, $state, queue = {}, abstractKey = 'abstract';
55

66
// Builds state properties from definition passed to registerState()
77
var stateBuilder = {
@@ -178,7 +178,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory, $
178178
states[name] = state;
179179

180180
// Register the state in the global state list and with $urlRouter if necessary.
181-
if (!state['abstract'] && state.url) {
181+
if (!state[abstractKey] && state.url) {
182182
$urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {
183183
if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {
184184
$state.transitionTo(state, $match, { location: false });
@@ -318,7 +318,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory, $
318318
throw new Error("No such state '" + to + "'");
319319
}
320320
}
321-
if (toState['abstract']) throw new Error("Cannot transition to abstract state '" + to + "'");
321+
if (toState[abstractKey]) throw new Error("Cannot transition to abstract state '" + to + "'");
322322
if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);
323323
to = toState;
324324

0 commit comments

Comments
 (0)