Skip to content

Commit

Permalink
Update deps (#4784)
Browse files Browse the repository at this point in the history
* update deps

* remove now-unnecessary flow lib

* disable flow for ava tests

it appears to fail because the libdefs have ambiguous unions

* orangered: fix flow issue

* add new lint rules

* remove deprecated scss->css imports

* update again

* reformat css

* fix css lint

* update flow version
  • Loading branch information
erikdesjardins committed Jun 15, 2018
1 parent 88abbc8 commit c8afc0d
Show file tree
Hide file tree
Showing 13 changed files with 1,076 additions and 1,497 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
},
"extends": ["eslint:all", "plugin:ava/recommended"],
"rules": {
"flowtype/array-style-complex-type": 0,
"flowtype/array-style-simple-type": 0,
"flowtype/boolean-style": 2,
"flowtype/define-flow-type": 2,
"flowtype/delimiter-dangle": [2, "always-multiline"],
Expand All @@ -34,6 +36,7 @@
"flowtype/no-flow-fix-me-comments": 0,
"flowtype/no-mutable-array": 0,
"flowtype/no-primitive-constructor-types": 2,
"flowtype/no-types-missing-file-annotation": 2,
"flowtype/no-unused-expressions": 2,
"flowtype/no-weak-types": [2, { "any": false }],
"flowtype/object-type-delimiter": 0,
Expand Down Expand Up @@ -76,11 +79,14 @@
{ "target": "./lib/vendor", "from": "./lib/core" }
] }],
"import/default": 2,
"import/dynamic-import-chunkname": 2,
"import/export": 2,
"import/exports-last": 0,
"import/extensions": [2, { "js": "never" }],
"import/first": 2,
"import/group-exports": 0,
"import/imports-first": 2,
"import/max-dependencies": 0,
"import/named": 2,
"import/namespace": 2,
"import/newline-after-import": 2,
Expand All @@ -98,6 +104,7 @@
"import/no-mutable-exports": 0,
"import/no-named-as-default": 2,
"import/no-named-as-default-member": 2,
"import/no-named-default": 2,
"import/no-namespace": 0,
"import/no-nodejs-modules": 2,
"import/no-self-import": 2,
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
suppress_comment=\\(.\\|\n\\)*\\$FlowIgnore

[version]
0.69.0
0.74.0
17 changes: 0 additions & 17 deletions flow/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ declare class Event {
CAPTURING_PHASE: number;
}

// https://github.com/facebook/flow/blob/7b172c807fea56f8dc8f40f4539e683fa16e4b2f/lib/bom.js#L824
// Make the constructor take map objects or strings.
declare class URLSearchParams {
/*:: @@iterator(): Iterator<[string, string]>; */
constructor(query?: string | { [key: string]: string }): void;
append(name: string, value: string): void;
delete(name: string): void;
entries(): Iterator<[string, string]>;
forEach(callback: (value: string, name: string, params: URLSearchParams) => any, thisArg?: any): void;
get(name: string): string;
getAll(name: string): Array<string>;
has(name: string): boolean;
keys(): Iterator<string>;
set(name: string, value: string): void;
values(): Iterator<string>;
}

// temp: make querySelector return value non-nullable

// make documentElement, body, head non-nullable
Expand Down
2 changes: 1 addition & 1 deletion lib/environment/utils/__tests__/messaging.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow */
/* @noflow */

import test from 'ava';

Expand Down
4 changes: 3 additions & 1 deletion lib/modules/orangered.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ const nativeButtons = _.once(() => {
});

const floatingButtons = _.once(() => {
if (!module.options.showFloatingEnvelope.value) return {};
if (!module.options.showFloatingEnvelope.value) {
return { $floatingInboxButton: undefined, $floatingInboxCount: undefined };
}
let $floatingInboxButton, $floatingInboxCount;

const pinHeader = BetteReddit.module.options.pinHeader.value;
Expand Down
3 changes: 1 addition & 2 deletions lib/utils/__tests__/array.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* @flow */
/* eslint-disable prefer-reflect */
/* @noflow */

import test from 'ava';

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/__tests__/async.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow */
/* @noflow */

import test from 'ava';

Expand Down
181 changes: 0 additions & 181 deletions lib/vendor/guiders.css

This file was deleted.

162 changes: 162 additions & 0 deletions lib/vendor/guiders.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/vendor/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../node_modules/jquery.tokeninput/styles/token-input-facebook';
@import './token-input-facebook';
@import './guiders';

// override settings console li style
Expand Down
118 changes: 118 additions & 0 deletions lib/vendor/token-input-facebook.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Example tokeninput style #2: Facebook style
ul.token-input-list-facebook {
overflow: hidden;
height: auto !important;
width: 400px;
border: 1px solid #8496ba;
cursor: text;
font-size: 12px;
font-family: Verdana, sans-serif;
min-height: 1px;
z-index: 999;
margin: 0;
padding: 0;
background-color: #fff;
list-style-type: none;
clear: left;
}

ul.token-input-list-facebook li input {
border: none;
width: 100px;
padding: 3px 8px;
background-color: white;
margin: 2px 0;
appearance: caret;
}

li.token-input-token-facebook {
overflow: hidden;
height: auto !important;
margin: 3px;
padding: 1px 3px;
background-color: #eff2f7;
color: #000;
cursor: default;
border: 1px solid #ccd5e4;
font-size: 11px;
border-radius: 5px;
float: left;
white-space: nowrap;
}

li.token-input-token-facebook p {
display: inline;
padding: 0;
margin: 0;
}

li.token-input-token-facebook span {
color: #a6b3cf;
margin-left: 5px;
font-weight: bold;
cursor: pointer;
}

li.token-input-selected-token-facebook {
background-color: #5670a6;
border: 1px solid #3b5998;
color: #fff;
}

li.token-input-input-token-facebook {
float: left;
margin: 0;
padding: 0;
list-style-type: none;
}

div.token-input-dropdown-facebook {
position: absolute;
width: 400px;
background-color: #fff;
overflow: hidden;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: default;
font-size: 11px;
font-family: Verdana, sans-serif;
z-index: 1;
}

div.token-input-dropdown-facebook p {
margin: 0;
padding: 5px;
font-weight: bold;
color: #777;
}

div.token-input-dropdown-facebook ul {
margin: 0;
padding: 0;
}

div.token-input-dropdown-facebook ul li {
background-color: #fff;
padding: 3px;
margin: 0;
list-style-type: none;
}

div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook {
background-color: #fff;
}

div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook {
background-color: #fff;
}

div.token-input-dropdown-facebook ul li em {
font-weight: bold;
font-style: normal;
}

div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook {
background-color: #3b5998;
color: #fff;
}
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,71 +65,71 @@
"jquery": "3.3.1",
"jquery-sortable": "0.9.13",
"jquery.tokeninput": "Reddit-Enhancement-Suite/jquery-tokeninput#v2.0.1",
"js-base64": "2.4.3",
"lodash": "4.17.5",
"moment": "2.22.1",
"js-base64": "2.4.5",
"lodash": "4.17.10",
"moment": "2.22.2",
"numeral": "2.0.6",
"resize-observer-lite": "Reddit-Enhancement-Suite/resize-observer-lite#59af4a859cb7da7859fec1f6bceecf26dd278916",
"snudown-js": "3.1.0",
"snudown-js": "3.1.1",
"suncalc": "1.8.0",
"tinycolor2": "1.4.1",
"whatwg-fetch": "2.0.4"
},
"devDependencies": {
"autoprefixer": "8.2.0",
"autoprefixer": "8.6.2",
"ava": "0.25.0",
"babel-core": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-loader": "7.1.4",
"babel-plugin-lodash": "3.3.2",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-dead-code-elimination": "2.2.2",
"babel-plugin-transform-define": "1.3.0",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.2",
"babel-plugin-transform-export-extensions": "6.22.0",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"chrome-extension-deploy": "3.0.0",
"coveralls": "3.0.0",
"cross-env": "5.1.4",
"coveralls": "3.0.1",
"cross-env": "5.2.0",
"css-loader": "0.28.11",
"edge-extension-deploy": "1.0.1",
"eslint": "4.19.1",
"eslint-import-resolver-webpack": "0.9.0",
"eslint-import-resolver-webpack": "0.10.0",
"eslint-plugin-ava": "4.5.1",
"eslint-plugin-dollar-sign": "1.0.1",
"eslint-plugin-filenames": "1.2.0",
"eslint-plugin-flowtype": "2.46.2",
"eslint-plugin-import": "2.11.0",
"eslint-plugin-flowtype": "2.48.0",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-no-useless-assign": "1.0.2",
"eslint-plugin-prefer-spread": "1.0.3",
"exec-loader": "4.0.0",
"extricate-loader": "3.0.0",
"file-loader": "1.1.11",
"firefox-extension-deploy": "1.1.0",
"flow-bin": "0.69.0",
"flow-bin": "0.74.0",
"html-loader": "0.5.5",
"inert-entry-webpack-plugin": "4.0.2",
"interpolate-loader": "2.0.0",
"jscodeshift": "0.5.0",
"jscodeshift": "0.5.1",
"jszip": "2.6.1",
"lodash-webpack-plugin": "0.11.5",
"manifoldjs": "0.7.6",
"nightwatch": "0.9.20",
"node-sass": "4.8.3",
"nyc": "11.6.0",
"nightwatch": "0.9.21",
"node-sass": "4.9.0",
"nyc": "11.8.0",
"opera-extension-deploy": "0.2.3",
"postcss-loader": "2.1.3",
"postcss-loader": "2.1.5",
"prop-loader": "1.0.0",
"rimraf": "2.6.2",
"sass-lint": "1.12.1",
"sass-loader": "7.0.1",
"sass-loader": "7.0.3",
"semver": "5.5.0",
"sibling-loader": "1.2.0",
"spawn-loader": "6.0.0",
"url-loader": "1.0.1",
"webpack": "4.5.0",
"webpack-cli": "2.0.14",
"webpack": "4.12.0",
"webpack-cli": "3.0.6",
"zip-webpack-plugin": "3.0.0"
}
}
Loading

0 comments on commit c8afc0d

Please sign in to comment.