From 4673af6fd8b243f27ef45c277b5301cceff3d9eb Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 29 Sep 2016 12:54:46 +0200 Subject: [PATCH] chore(package): update all dependencies --- packages/xo-server-auth-github/.babelrc | 15 ----- packages/xo-server-auth-github/.editorconfig | 2 +- packages/xo-server-auth-github/.gitignore | 5 +- packages/xo-server-auth-github/.mocha.js | 4 +- packages/xo-server-auth-github/.travis.yml | 6 +- packages/xo-server-auth-github/README.md | 18 +----- packages/xo-server-auth-github/package.json | 55 ++++++++++++++----- .../xo-server-auth-github/src/index.spec.js | 17 ++++++ 8 files changed, 66 insertions(+), 56 deletions(-) delete mode 100644 packages/xo-server-auth-github/.babelrc create mode 100644 packages/xo-server-auth-github/src/index.spec.js diff --git a/packages/xo-server-auth-github/.babelrc b/packages/xo-server-auth-github/.babelrc deleted file mode 100644 index 5e9978a41..000000000 --- a/packages/xo-server-auth-github/.babelrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "comments": false, - "compact": true, - "optional": [ - // Experimental features. - // "minification.constantFolding", - // "minification.deadCodeElimination", - - "es7.asyncFunctions", - "es7.decorators", - "es7.exportExtensions", - "es7.functionBind", - "runtime" - ] -} diff --git a/packages/xo-server-auth-github/.editorconfig b/packages/xo-server-auth-github/.editorconfig index da21ef4c5..b6db0112a 100644 --- a/packages/xo-server-auth-github/.editorconfig +++ b/packages/xo-server-auth-github/.editorconfig @@ -41,7 +41,7 @@ indent_style = space # # Two spaces seems to be the standard most common style, at least in # Node.js (http://nodeguide.com/style.html#tabs-vs-spaces). -[*.js] +[*.{js,jsx,ts,tsx}] indent_size = 2 indent_style = space diff --git a/packages/xo-server-auth-github/.gitignore b/packages/xo-server-auth-github/.gitignore index 384949d8a..fa69f37f1 100644 --- a/packages/xo-server-auth-github/.gitignore +++ b/packages/xo-server-auth-github/.gitignore @@ -1,8 +1,5 @@ -/bower_components/ /dist/ +/node_modules/ npm-debug.log npm-debug.log.* - -!node_modules/* -node_modules/*/ diff --git a/packages/xo-server-auth-github/.mocha.js b/packages/xo-server-auth-github/.mocha.js index b888fb4d5..e6d84e403 100644 --- a/packages/xo-server-auth-github/.mocha.js +++ b/packages/xo-server-auth-github/.mocha.js @@ -1,3 +1,5 @@ -try { require('clarify') } catch (_) {} +Error.stackTraceLimit = 100 + try { require('trace') } catch (_) {} +try { require('clarify') } catch (_) {} try { require('source-map-support/register') } catch (_) {} diff --git a/packages/xo-server-auth-github/.travis.yml b/packages/xo-server-auth-github/.travis.yml index 1be09b389..fb5d91729 100644 --- a/packages/xo-server-auth-github/.travis.yml +++ b/packages/xo-server-auth-github/.travis.yml @@ -1,11 +1,7 @@ language: node_js node_js: + - 'stable' - '4' - - 'iojs-v3' - - 'iojs-v2' - - 'iojs-v1' - - '0.12' - - '0.10' # Use containers. # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ diff --git a/packages/xo-server-auth-github/README.md b/packages/xo-server-auth-github/README.md index 5d8114809..4e36ed3b9 100644 --- a/packages/xo-server-auth-github/README.md +++ b/packages/xo-server-auth-github/README.md @@ -21,23 +21,11 @@ Installation of the [npm package](https://npmjs.org/package/xo-server-auth-githu > see [its documentation](https://github.com/jaredhanson/passport-github#configure-strategy) > for more information about the configuration. +Like all other xo-server plugins, it can be configured directly via +the web iterface, see [the plugin documentation](https://xen-orchestra.com/docs/plugins.html). + ![Registering XO instance in GitHub](github.png) -To enable this plugin you have to add it into the configuration file -of XO-Server: - -```yaml -plugins: - - auth-github: - - # Both these values will be given to you when your instance of XO - # is registered in GitHub - # (https://github.com/settings/developers). - clientID: c2f2f881062f170e2ec3 - clientSecret: 4335e70f62e2dbb7917df0126b1015b5617bceea -``` - ## Development ### Installing dependencies diff --git a/packages/xo-server-auth-github/package.json b/packages/xo-server-auth-github/package.json index e8ef74272..99f5b4f99 100644 --- a/packages/xo-server-auth-github/package.json +++ b/packages/xo-server-auth-github/package.json @@ -25,32 +25,57 @@ "files": [ "dist/" ], + "engines": { + "node": ">=4" + }, "dependencies": { - "babel-runtime": "^5.8.20", - "passport-github": "^1.0.0" + "babel-runtime": "^6.11.6", + "passport-github": "^1.1.0" }, "devDependencies": { - "babel": "^5.8.23", - "babel-eslint": "^4.1.1", - "clarify": "^1.0.5", - "mocha": "^2.3.1", - "must": "^0.12.0", - "source-map-support": "^0.3.2", - "standard": "^5.2.1", - "trace": "^1.2.0" + "babel-cli": "^6.16.0", + "babel-eslint": "^7.0.0", + "babel-plugin-lodash": "^3.2.9", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.16.0", + "babel-preset-stage-0": "^6.16.0", + "clarify": "^2.0.0", + "dependency-check": "^2.6.0", + "ghooks": "^1.3.2", + "mocha": "^3.1.0", + "must": "^0.13.2", + "source-map-support": "^0.4.3", + "standard": "^8.2.0", + "trace": "^2.3.3" }, "scripts": { - "build": "babel --source-maps --out-dir=dist/ src/", - "dev": "babel --watch --source-maps --out-dir=dist/ src/", + "build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/", + "depcheck": "dependency-check ./package.json", + "dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/", + "dev-test": "mocha --opts .mocha.opts --watch --reporter=min \"dist/**/*.spec.js\"", "lint": "standard", + "posttest": "npm run lint && npm run depcheck", "prepublish": "npm run build", - "test": "npm run lint && mocha --opts .mocha.opts \"dist/**/*.spec.js\"", - "test-dev": "mocha --opts .mocha.opts --watch --reporter=min \"dist/**/*.spec.js\"" + "test": "mocha --opts .mocha.opts \"dist/**/*.spec.js\"" + }, + "babel": { + "plugins": [ + "lodash" + ], + "presets": [ + "es2015", + "stage-0" + ] }, "standard": { "ignore": [ - "dist/**" + "dist" ], "parser": "babel-eslint" + }, + "config": { + "ghooks": { + "commit-msg": "npm test" + } } } diff --git a/packages/xo-server-auth-github/src/index.spec.js b/packages/xo-server-auth-github/src/index.spec.js new file mode 100644 index 000000000..2319bd7d5 --- /dev/null +++ b/packages/xo-server-auth-github/src/index.spec.js @@ -0,0 +1,17 @@ +/* eslint-env mocha */ + +import expect from 'must' + +// =================================================================== + +import myLib from './' + +// =================================================================== + +describe.skip('myLib', () => { + it('does something', () => { + // TODO: some real tests. + + expect(myLib).to.exists() + }) +})