refactor: ⬆️ upgrade dependencies & fix issues in dev mode

This commit is contained in:
Meeeeow 2017-11-05 20:09:44 +08:00 committed by juanpicado
parent d52f426226
commit 691bc97007
7 changed files with 56 additions and 50 deletions

View File

@ -1,5 +1,5 @@
{
"extends": "stylelint-config-standard",
"extends": "stylelint-config-recommended-scss",
"rules": {
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["/global/"]

View File

@ -26,21 +26,21 @@
"bunyan": "^1.8.0",
"chalk": "^2.0.1",
"commander": "^2.11.0",
"compression": "1.6.2",
"compression": "1.7.1",
"cookies": "^0.7.0",
"cors": "^2.8.3",
"express": "4.15.3",
"express": "4.16.2",
"global": "^4.3.2",
"handlebars": "4.0.5",
"handlebars": "4.0.11",
"http-errors": "^1.4.0",
"js-string-escape": "1.0.1",
"js-yaml": "^3.6.0",
"jsonwebtoken": "^7.4.1",
"jsonwebtoken": "^8.1.0",
"lockfile": "^1.0.1",
"lodash": "4.17.4",
"lunr": "^0.7.0",
"marked": "0.3.9",
"mime": "^1.3.6",
"mime": "^2.0.3",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"pkginfo": "^0.4.0",
@ -49,8 +49,8 @@
"unix-crypt-td-js": "^1.0.0"
},
"devDependencies": {
"axios": "0.16.2",
"babel-cli": "^6.26.0",
"axios": "0.17.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "8.0.1",
"babel-loader": "7.1.2",
@ -59,7 +59,7 @@
"babel-plugin-transform-es2015-classes": "^6.24.1",
"babel-plugin-transform-runtime": "6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "1.6.0",
"babel-preset-env": "1.6.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-node4": "2.1.0",
"babel-preset-flow": "6.23.0",
@ -73,50 +73,51 @@
"codacy-coverage": "2.0.2",
"codecov": "2.2.0",
"coveralls": "2.13.1",
"css-loader": "0.28.4",
"element-react": "1.0.16",
"element-theme-default": "1.3.7",
"eslint": "4.2.0",
"eslint-config-google": "0.8.0",
"eslint-loader": "1.8.0",
"eslint-plugin-babel": "4.1.1",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.6.1",
"eslint-plugin-react": "7.1.0",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"css-loader": "0.28.7",
"element-react": "1.4.1",
"element-theme-default": "1.4.9",
"eslint": "4.10.0",
"eslint-config-google": "0.9.1",
"eslint-loader": "1.9.0",
"eslint-plugin-babel": "4.1.2",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"flow-bin": "0.52.0",
"flow-runtime": "0.13.0",
"flow-runtime": "0.14.0",
"friendly-errors-webpack-plugin": "1.6.1",
"fs-extra": "4.0.1",
"github-markdown-css": "2.8.0",
"html-webpack-plugin": "2.29.0",
"fs-extra": "4.0.2",
"github-markdown-css": "2.9.0",
"html-webpack-plugin": "2.30.1",
"in-publish": "2.0.0",
"localstorage-memory": "1.0.2",
"mocha": "3.5.3",
"mocha-lcov-reporter": "1.3.0",
"node-sass": "4.5.3",
"node-sass": "4.6.0",
"normalize.css": "7.0.0",
"nyc": "11.0.3",
"ora": "1.3.0",
"prop-types": "15.5.10",
"react": "15.6.1",
"react-dom": "15.6.1",
"prop-types": "15.6.0",
"react": "16.0.0",
"react-dom": "16.0.0",
"react-hot-loader": "3.0.0-beta.7",
"react-router-dom": "4.1.1",
"react-syntax-highlighter": "5.6.2",
"rimraf": "2.6.1",
"react-router-dom": "4.2.2",
"react-syntax-highlighter": "5.8.0",
"rimraf": "2.6.2",
"sass-loader": "6.0.6",
"source-map-loader": "0.2.1",
"source-map-loader": "0.2.3",
"standard-version": "4.2.0",
"style-loader": "0.18.2",
"stylelint": "7.13.0",
"stylelint-config-standard": "16.0.0",
"stylelint-webpack-plugin": "0.8.0",
"url-loader": "0.5.8",
"webpack": "3.2.0",
"webpack-dev-server": "2.5.0",
"webpack-merge": "4.1.0"
"style-loader": "0.19.0",
"stylelint": "8.2.0",
"stylelint-config-recommended-scss": "^2.0.0",
"stylelint-scss": "^2.1.0",
"stylelint-webpack-plugin": "0.9.0",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
"webpack-merge": "4.1.1"
},
"keywords": [
"private",

View File

@ -27,13 +27,13 @@ module.exports = function(route, auth, storage) {
// tagging a package
route.put('/:package/:tag',
can('publish'), media(mime.lookup('json')), tag_package_version);
can('publish'), media(mime.getType('json')), tag_package_version);
route.post('/-/package/:package/dist-tags/:tag',
can('publish'), media(mime.lookup('json')), tag_package_version);
can('publish'), media(mime.getType('json')), tag_package_version);
route.put('/-/package/:package/dist-tags/:tag',
can('publish'), media(mime.lookup('json')), tag_package_version);
can('publish'), media(mime.getType('json')), tag_package_version);
route.delete('/-/package/:package/dist-tags/:tag', can('publish'), function(req, res, next) {
const tags = {};
@ -59,7 +59,7 @@ module.exports = function(route, auth, storage) {
});
});
route.post('/-/package/:package/dist-tags', can('publish'), media(mime.lookup('json')), expect_json,
route.post('/-/package/:package/dist-tags', can('publish'), media(mime.getType('json')), expect_json,
function(req, res, next) {
storage.merge_tags(req.params.package, req.body, function(err) {
if (err) {

View File

@ -17,7 +17,7 @@ module.exports = function(router, auth, storage, config) {
const can = Middleware.allow(auth);
// publishing a package
router.put('/:package/:_rev?/:revision?', can('publish'), media(mime.lookup('json')), expect_json, function(req, res, next) {
router.put('/:package/:_rev?/:revision?', can('publish'), media(mime.getType('json')), expect_json, function(req, res, next) {
const name = req.params.package;
let metadata;
const create_tarball = function(filename, data, cb) {
@ -170,7 +170,7 @@ module.exports = function(router, auth, storage, config) {
});
// adding a version
router.put('/:package/:version/-tag/:tag', can('publish'), media(mime.lookup('json')), expect_json, function(req, res, next) {
router.put('/:package/:version/-tag/:tag', can('publish'), media(mime.getType('json')), expect_json, function(req, res, next) {
let name = req.params.package;
let version = req.params.version;
let tag = req.params.tag;

View File

@ -5,6 +5,9 @@
"jest": true,
"es6": true
},
"globals": {
"__DEBUG__": true
},
"rules": {
"require-jsdoc": 0,
"no-console": [

View File

@ -1 +1,3 @@
__webpack_public_path__ = window.VERDACCIO_API_URL.replace(/\/verdaccio\/$/, '/static/') // eslint-disable-line
if (!__DEBUG__) {
__webpack_public_path__ = window.VERDACCIO_API_URL.replace(/\/verdaccio\/$/, '/static/') // eslint-disable-line
}

View File

@ -29,14 +29,14 @@ module.exports = {
/* Pre loader */
{
enforce: 'pre',
test: /\.js?$/,
test: /\.jsx?$/,
exclude: /node_modules/,
use: 'eslint-loader',
},
/* Normal loader */
{
test: /\.js?$/,
test: /\.jsx?$/,
exclude: /node_modules/,
use: 'babel-loader',
},