Skip to content

Commit

Permalink
chore(depends): updating all dev dependencies
Browse files Browse the repository at this point in the history
- Rewrite Karma config to comply with new semantics
- Trick JSHint into validating 'abstract' hash keys in ES-compliant way
- Fixes #585
  • Loading branch information
nateabele committed Dec 6, 2013
1 parent 516a9a1 commit 4b8282c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 64 deletions.
102 changes: 52 additions & 50 deletions config/karma.js
Original file line number Diff line number Diff line change
@@ -1,64 +1,66 @@
// Testacular configuration file
module.exports = function (karma) {
karma.set({
// base path, that will be used to resolve files and exclude
basePath: '..',

// base path, that will be used to resolve files and exclude
basePath = '..';
frameworks: ['jasmine'],

// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'lib/angular-1.1.5.js',
'test/lib/angular-mocks-1.1.5.js',
'test/testUtils.js',
// list of files / patterns to load in the browser
files: [
'lib/angular-1.1.5.js',
'test/lib/angular-mocks-1.1.5.js',
'test/testUtils.js',

'src/common.js',
'src/resolve.js',
'src/templateFactory.js',
'src/urlMatcherFactory.js',
'src/urlRouter.js',
'src/view.js',
'src/state.js',
'src/viewDirective.js',
'src/stateDirectives.js',
'src/stateFilters.js',
'src/compat.js',
'src/common.js',
'src/resolve.js',
'src/templateFactory.js',
'src/urlMatcherFactory.js',
'src/urlRouter.js',
'src/view.js',
'src/state.js',
'src/viewDirective.js',
'src/stateDirectives.js',
'src/stateFilters.js',
'src/compat.js',

'test/*Spec.js',
// 'test/compat/matchers.js',
// 'test/compat/*Spec.js',
];
'test/*Spec.js',
// 'test/compat/matchers.js',
// 'test/compat/*Spec.js',
],

// list of files to exclude
exclude = [];
// list of files to exclude
exclude: [],

// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots' || 'progress'
reporter = 'dots';
// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots' || 'progress'
reporters: 'dots',

// these are default values, just to show available options
// these are default values, just to show available options

// web server port
port = 8080;
// web server port
port: 8080,

// enable / disable colors in the output (reporters and logs)
colors = true;
// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel = LOG_DEBUG;
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: karma.LOG_DEBUG,

// enable / disable watching file and executing tests whenever any file changes
autoWatch = false;
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,

// polling interval in ms (ignored on OS that support inotify)
autoWatchInterval = 0;

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari
// - PhantomJS
browsers = [ 'PhantomJS' ];
// polling interval in ms (ignored on OS that support inotify)
autoWatchInterval: 0,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari
// - PhantomJS
browsers: [ 'PhantomJS' ]
})
};
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.3.0",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-connect": "~0.2.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-karma": "~0.4.3",
"jsdoc": "git://github.com/jsdoc3/jsdoc.git#v3.1.1",
"shelljs": "~0.1.4",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-karma": "~0.6.2",
"jsdoc": "git://github.com/jsdoc3/jsdoc.git#v3.2.2",
"shelljs": "~0.2.6",
"faithful-exec": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma-requirejs": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"karma-coffee-preprocessor": "~0.1.0",
"karma": "~0.10.1",
"karma": "~0.10.4",
"karma-phantomjs-launcher": "~0.1.0",
"load-grunt-tasks": "~0.2.0",
"grunt-conventional-changelog": "~1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions src/state.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider', '$locationProvider'];
function $StateProvider( $urlRouterProvider, $urlMatcherFactory, $locationProvider) {

var root, states = {}, $state, queue = {};
var root, states = {}, $state, queue = {}, abstractKey = 'abstract';

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

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

Expand Down

0 comments on commit 4b8282c

Please sign in to comment.