Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #459

Merged
merged 12 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .eslintrc-platform.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"comment": "mattermost/platform@3.5.0/webapp/.eslintrc.json",
"comment": "mattermost/platform@3.6.2/webapp/.eslintrc.json",
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"impliedStrict": true,
"modules": true
"modules": true,
"experimentalObjectRestSpread": true
}
},
"parser": "babel-eslint",
Expand Down Expand Up @@ -51,6 +52,7 @@
"dot-notation": 2,
"eqeqeq": [2, "smart"],
"func-call-spacing": [2, "never"],
"func-name-matching": 0,
"func-names": 2,
"func-style": [2, "declaration"],
"generator-star-spacing": [2, {"before": false, "after": true}],
Expand Down Expand Up @@ -137,6 +139,7 @@
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": [2, "always"],
"no-return-await": 2,
"no-script-url": 2,
"no-self-assign": [2, {"props": true}],
"no-self-compare": 2,
Expand Down Expand Up @@ -167,12 +170,13 @@
"no-useless-constructor": 2,
"no-useless-escape": 2,
"no-useless-rename": 2,
"no-useless-return": 2,
"no-var": 0,
"no-void": 2,
"no-warning-comments": 1,
"no-whitespace-before-property": 2,
"no-with": 2,
"object-curly-newline": 0,
"object-curly-newline": 0,
"object-curly-spacing": [2, "never"],
"object-property-newline": [2, {"allowMultiplePropertiesPerLine": true}],
"object-shorthand": [2, "always"],
Expand All @@ -183,14 +187,14 @@
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-numeric-literals": 2,
"prefer-reflect": 2,
"prefer-rest-params": 2,
"prefer-spread": 2,
"prefer-template": 0,
"quote-props": [2, "as-needed"],
"quotes": [2, "single", "avoid-escape"],
"radix": 2,
"react/display-name": [2, { "ignoreTranspilerName": false }],
"react/forbid-component-props": 0,
"react/jsx-boolean-value": [2, "always"],
"react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }],
"react/jsx-curly-spacing": [2, "never"],
Expand All @@ -203,41 +207,41 @@
"react/jsx-key": 2,
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
"react/jsx-no-bind": 0,
"react/jsx-no-comment-textnodes": 2,
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
"react/jsx-no-literals": 2,
"react/jsx-no-target-blank": 2,
"react/jsx-no-undef": 2,
"react/jsx-pascal-case": 2,
"react/jsx-space-before-closing": [2, "never"],
"react/jsx-tag-spacing": [2, { "closingSlash": "never", "beforeSelfClosing": "never", "afterOpening": "never" }],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-no-comment-textnodes": 2,
"react/jsx-wrap-multilines": 2,
"react/no-children-prop": 2,
"react/no-danger": 0,
"react/no-danger-with-children": 2,
"react/no-deprecated": 2,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-direct-mutation-state": 2,
"react/no-find-dom-node": 1,
"react/no-is-mounted": 2,
"react/no-multi-comp": [2, { "ignoreStateless": true }],
"react/no-render-return-value": 2,
"react/no-set-state": 0,
"react/no-string-refs": 0,
"react/no-unescaped-entities": 2,
"react/no-unknown-property": 2,
"react/no-unused-prop-types": [1, {"skipShapeProps": true}],
"react/prefer-es6-class": 2,
"react/prefer-stateless-function": 0,
"react/prop-types": 2,
"react/require-optimization": 1,
"react/require-render-return": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 0,
"react/jsx-wrap-multilines": 2,
"react/no-find-dom-node": 1,
"react/forbid-component-props": 0,
"react/no-danger-with-children": 2,
"react/no-unused-prop-types": [1, {"skipShapeProps": true}],
"react/style-prop-object": 2,
"react/no-children-prop": 2,
"react/no-unescaped-entities": 2,
"require-yield": 2,
"rest-spread-spacing": [2, "never"],
"semi": [2, "always"],
Expand Down
46 changes: 46 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"appId": "com.mattermost.desktop",
"directories": {
"buildResources": "resources",
"app": "dist",
"output": "release"
},
"deb": {
"synopsis": "Mattermost"
},
"linux": {
"category": "InstantMessaging",
"target": [
"deb",
"tar.gz"
],
"extraFiles": [
{
"from": "resources",
"filter": "icon.png"
},
{
"from": "resources/linux",
"filter": [
"create_desktop_file.sh",
"README.md"
]
}
]
},
"mac": {
"category": "public.app-category.productivity",
"target": [
"tar.gz"
]
},
"squirrelWindows": {
"iconUrl": "https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico"
},
"win": {
"target": [
"squirrel",
"zip"
]
}
}
79 changes: 18 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,80 +29,37 @@
"test": "npm-run-all build test:* lint:*",
"test:app": "mocha --reporter mocha-circleci-reporter --recursive test/specs",
"package:all": "npm-run-all package:windows package:mac package:linux",
"package:windows": "build --win --x64 --ia32 --em.name=mattermost && npm run manipulate-windows-zip",
"package:mac": "build --mac",
"package:linux": "build --linux --x64 --ia32 --em.name=mattermost-desktop",
"package:windows": "build --win --x64 --ia32 --em.name=mattermost --publish=never && npm run manipulate-windows-zip",
"package:mac": "build --mac --publish=never",
"package:linux": "build --linux --x64 --ia32 --em.name=mattermost-desktop --publish=never",
"manipulate-windows-zip": "node scripts/manipulate_windows_zip.js",
"lint:js": "eslint --ext .js --ext .jsx ."
},
"devDependencies": {
"7zip-bin": "^2.0.4",
"babel-core": "^6.21.0",
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-preset-react": "^6.16.0",
"babel-loader": "^6.3.2",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-react": "^6.23.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"cross-env": "^3.1.3",
"cross-env": "^3.1.4",
"devtron": "^1.4.0",
"electron": "1.4.13",
"electron-builder": "^10.9.2",
"electron": "1.6.1",
"electron-builder": "^14.5.3",
"electron-builder-squirrel-windows": "^15.0.0",
"electron-connect": "^0.6.1",
"eslint": "^3.12.2",
"eslint-plugin-react": "^6.8.0",
"eslint": "^3.16.1",
"eslint-plugin-react": "^6.10.0",
"gulp": "^3.9.1",
"gulp-diff": "^1.0.0",
"gulp-jsbeautifier": "^2.0.3",
"json-loader": "^0.5.4",
"gulp-jsbeautifier": "^2.0.4",
"mocha": "^3.2.0",
"mocha-circleci-reporter": "0.0.2",
"npm-run-all": "^3.1.2",
"spectron": "~3.4.1",
"webpack": "^1.14.0",
"webpack-merge": "^1.1.2"
},
"build": {
"appId": "com.mattermost.desktop",
"linux": {
"category": "InstantMessaging",
"target": [
"deb",
"tar.gz"
],
"synopsis": "Mattermost",
"extraFiles": [
{
"from": "resources",
"filter": "icon.png"
},
{
"from": "resources/linux",
"filter": [
"create_desktop_file.sh",
"README.md"
]
}
]
},
"mac": {
"category": "public.app-category.productivity",
"target": [
"tar.gz"
]
},
"win": {
"description": "Mattermost",
"target": [
"squirrel",
"zip"
],
"iconUrl": "https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico"
}
},
"directories": {
"buildResources": "resources",
"app": "dist",
"output": "release"
"npm-run-all": "^4.0.2",
"spectron": "~3.6.0",
"webpack": "^2.2.1",
"webpack-merge": "^3.0.0"
}
}
6 changes: 0 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ const assetsDir = path.resolve(app.getAppPath(), 'assets');
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;

// Fix confused cursor in HiDPI
// https://github.com/electron/electron/issues/7655#issuecomment-259688853
if (process.platform === 'win32') {
app.commandLine.appendSwitch('enable-use-zoom-for-dsf', 'false');
}

var argv = require('yargs').parse(process.argv.slice(1));

const electronConnect = argv.livereload ? require('electron-connect') : null;
Expand Down
6 changes: 3 additions & 3 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"electron-context-menu": "^0.8.0",
"electron-squirrel-startup": "^1.0.0",
"os-locale": "^2.0.0",
"react": "^15.4.1",
"react-addons-css-transition-group": "^15.4.1",
"react": "^15.4.2",
"react-addons-css-transition-group": "^15.4.2",
"react-bootstrap": "~0.30.7",
"react-dom": "^15.4.1",
"react-dom": "^15.4.2",
"underscore": "^1.8.3",
"yargs": "^3.32.0"
}
Expand Down
3 changes: 2 additions & 1 deletion test/specs/browser/index_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('browser/index.html', function desc() {
}]
}));
return this.app.restart().then(() => {
return this.app.client.waitUntilWindowLoaded().pause(1000);
return this.app.client.waitUntilWindowLoaded().pause(1500);
}).then(() => {
return this.app.browserWindow.getTitle().should.eventually.equal('Mattermost Desktop testing html');
});
Expand Down Expand Up @@ -176,6 +176,7 @@ describe('browser/index.html', function desc() {
// See settings_test for specs that cover the actual prompt
return this.app.client.waitUntilWindowLoaded().
click('#tabBarAddNewTeam').
pause(500).
isExisting('#newServerModal').should.eventually.be.true;
});
});
3 changes: 3 additions & 0 deletions test/specs/browser/settings_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,14 @@ describe('browser/settings.html', function desc() {
it('should not be valid if no team name has been set', () => {
return this.app.client.
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamNameInput').should.eventually.equal(true);
});

it('should not be valid if no server address has been set', () => {
return this.app.client.
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamUrlInput').should.eventually.equal(true);
});

Expand Down Expand Up @@ -348,6 +350,7 @@ describe('browser/settings.html', function desc() {
return this.app.client.
setValue('#teamUrlInput', 'superInvalid url').
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamUrlInput').should.eventually.equal(true);
});

Expand Down
6 changes: 0 additions & 6 deletions webpack.config.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ module.exports = merge(base, {
output: {
filename: './dist/main.js'
},
module: {
loaders: [{
test: /\.json$/,
loader: 'json'
}]
},
node: {
__filename: false,
__dirname: false
Expand Down
15 changes: 7 additions & 8 deletions webpack.config.renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ module.exports = merge(base, {
filename: '[name].js'
},
module: {
loaders: [{
test: /\.json$/,
loader: 'json'
}, {
rules: [{
test: /\.jsx$/,
loader: 'babel',
query: {
presets: ['react'],
plugins: ['transform-object-rest-spread']
use: {
loader: 'babel-loader',
options: {
presets: ['react'],
plugins: ['transform-object-rest-spread']
}
}
}]
},
Expand Down