Skip to content

Commit

Permalink
Bump dependencies (OctoLinker#376)
Browse files Browse the repository at this point in the history
* Bump various dependencies

* Specify yarn version on Travis

* Fix code style
  • Loading branch information
stefanbuck authored Oct 4, 2017
1 parent f98a034 commit d8683cb
Show file tree
Hide file tree
Showing 12 changed files with 1,846 additions and 949 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ addons:
language: node_js
node_js:
- 6
cache: yarn
cache:
yarn: true
# Use npm > 4 to fix https://github.com/npm/npm/issues/14042
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.1.0
- export PATH=$HOME/.yarn/bin:$PATH
before_script:
- ./packages/blob-reader/scripts/update-fixtures.sh
- npm run package-all
Expand Down
4 changes: 3 additions & 1 deletion lib/background/insight.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class Insight {
this.cid = clientId;
}

track({ category, action, label, value }) {
track({
category, action, label, value,
}) {
const params = {
t: 'event',
ec: category,
Expand Down
2 changes: 1 addition & 1 deletion lib/click-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function openUrl(url, newWindow = false, newWindowActive = true) {

function getResolverUrls(dataAttr) {
const BASE_URL = 'https://github.com';
const pluginName = dataAttr.pluginName;
const { pluginName } = dataAttr;
const resolver = pluginManager.getResolver(pluginName);

if (!resolver) {
Expand Down
4 changes: 3 additions & 1 deletion lib/options/components/checkbox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default ({ name, label, value, defaultValue, description }) => {
export default ({
name, label, value, defaultValue, description,
}) => {
const val = (value === undefined) ? defaultValue : value;
const note = description ? `<p class="note">${description}</p>` : '';

Expand Down
4 changes: 3 additions & 1 deletion lib/options/components/input.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default ({ type, name, label, value, defaultValue, description }) => {
export default ({
type, name, label, value, defaultValue, description,
}) => {
const val = (value === undefined) ? defaultValue : value;
const note = description ? `<p class="note">${description}</p>` : '';

Expand Down
4 changes: 2 additions & 2 deletions lib/plugin-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export default class {
const plugin = this._pluginsList.find(({ name }) => name === pluginName);

if (!plugin) {
console.error(`Plugin ${pluginName} not found`); // eslint-disable-line no-console
console.error(`Plugin ${pluginName} not found`); // eslint-disable-line no-console
return;
}

if (!plugin.resolve) {
console.error(`No resolve found for ${pluginName}`); // eslint-disable-line no-console
console.error(`No resolve found for ${pluginName}`); // eslint-disable-line no-console
return;
}

Expand Down
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,64 +54,64 @@
},
"dependencies": {
"JSONPath": "^0.11.2",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"builtins": "^1.0.3",
"chrome-promise": "^2.0.2",
"chrome-promise": "^2.1.1",
"concat-map": "^0.0.1",
"core-js": "^2.4.1",
"core-js": "^2.5.1",
"escape-regex-string": "^1.0.4",
"findandreplacedomtext": "^0.4.5",
"github-injection": "^1.0.1",
"github-url-from-git": "^1.5.0",
"github-url-from-username-repo": "^1.0.2",
"giturl": "^1.0.0",
"jquery": "^3.1.1",
"jquery": "^3.2.1",
"path-parse": "^1.0.5",
"pop-zip": "^1.0.0",
"primer-core": "^2.0.0",
"primer-forms": "^1.0.6",
"primer-core": "^6.4.0",
"primer-forms": "^1.4.0",
"querystring": "^0.2.0",
"semver": "^5.3.0",
"semver": "^5.4.1",
"semver-regex": "^1.0.0",
"uuid": "^3.0.1",
"uuid": "^3.1.0",
"xregexp": "^3.2.0"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.1.10",
"babel-preset-env": "^1.6.0",
"chrome-launch": "^1.1.4",
"chrome-webstore-upload-cli": "^1.1.1",
"copy-webpack-plugin": "^4.0.1",
"eslint": "^3.14.1",
"eslint-config-airbnb-base": "^11.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-mocha": "^4.8.0",
"copy-webpack-plugin": "^4.1.0",
"eslint": "^4.8.0",
"eslint-config-airbnb-base": "^12.0.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-mocha": "^4.11.0",
"json": "^9.0.4",
"json-loader": "^0.5.4",
"karma": "^1.4.1",
"karma-chrome-launcher": "^2.0.0",
"karma-detect-browsers": "^2.2.4",
"json-loader": "^0.5.7",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-detect-browsers": "^2.2.5",
"karma-firefox-launcher": "^1.0.0",
"karma-fixture": "^0.2.6",
"karma-html2js-preprocessor": "^1.1.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.2",
"karma-mocha-reporter": "^2.2.4",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2",
"karma-webpack": "^2.0.4",
"mkdirp": "^0.5.1",
"mocha": "^3.2.0",
"npm-run-all": "^4.0.1",
"sinon": "^2.0.0-pre.4",
"web-ext": "^1.7.0",
"webpack": "^2.2.1"
"mocha": "^4.0.0",
"npm-run-all": "^4.1.1",
"sinon": "^4.0.1",
"web-ext": "^2.0.0",
"webpack": "^3.6.0"
},
"optionalDependencies": {
"fsevents": "*"
"fsevents": "1.1.2"
},
"private": true
}
1 change: 0 additions & 1 deletion packages/blob-reader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Blob from './blob';
import { getBlobWrapper } from './helper';

export default class BlobReader {

hasBlobs() {
return !!getBlobWrapper().length;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/blob-reader/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/blob/89f13651df126efdb4f1e3ae40183c9fdccdb4d3.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

describe('contains blob path', () => {
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/blob/89f13651df126efdb4f1e3ae40183c9fdccdb4d3.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

it('contains four lines', () => {
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/commit/b0775a93ea27ee381858ddd9fa2bb953d5b74acb_split.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

it('1st line', () => {
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/commit/b0775a93ea27ee381858ddd9fa2bb953d5b74acb_unified.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

it('contains four lines', () => {
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/gist/113827963013e98c6196db51cd889c39.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

it('contains blob path', () => {
Expand All @@ -212,7 +212,7 @@ describe('blob-reader', () => {
beforeEach(() => {
fixture.load('/packages/blob-reader/fixtures/github.com/issue/code.html');
const reader = new BlobReader();
result = reader.read()._blobs[0];
[result] = reader.read()._blobs;
});

it('contains blob root element', () => {
Expand Down
34 changes: 17 additions & 17 deletions packages/helper-grammar-regex-collection/go.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@ function multiImportRegExpBuilder(input) {
closingPattern: /^\)$/,
matchPattern: /"([^"]+)"/,
})
.map(([value]) => {
const domain = value.match(DOMAIN_REGEX);
.map(([value]) => {
const domain = value.match(DOMAIN_REGEX);

if (domain && !ALLOWED_DOMAINS.includes(domain[0])) {
return;
}
if (domain && !ALLOWED_DOMAINS.includes(domain[0])) {
return;
}

const val = escapeRegexString(value);
return new RegExp(`import\\s\\([^\)]+"(${val})"`, 'gm');
});
const val = escapeRegexString(value);
return new RegExp(`import\\s\\([^\)]+"(${val})"`, 'gm');
});
}

function singleImportRegExpBuilder(input) {
return bylineParser(input, {
matchPattern: /import\s(?:[_\.]\s|[\w]+\s)?['"]([^'"\s]+)['"]?/,
})
.map(([value]) => {
const domain = value.match(DOMAIN_REGEX);
.map(([value]) => {
const domain = value.match(DOMAIN_REGEX);

if (domain && !ALLOWED_DOMAINS.includes(domain[0])) {
return;
}
if (domain && !ALLOWED_DOMAINS.includes(domain[0])) {
return;
}

const val = escapeRegexString(value);
return new RegExp(`import\\s(?:[_\\.]\\s|[\\w]+\\s)?['"](${val})['"]?`, 'gm');
});
const val = escapeRegexString(value);
return new RegExp(`import\\s(?:[_\\.]\\s|[\\w]+\\s)?['"](${val})['"]?`, 'gm');
});
}

export default function (blobSource) {
return [].concat(
multiImportRegExpBuilder(blobSource),
singleImportRegExpBuilder(blobSource),
)
.filter(item => !!item);
.filter(item => !!item);
}
2 changes: 1 addition & 1 deletion packages/helper-grammar-regex-collection/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint import/namespace: [2, { allowComputed: true }]*/
/* eslint import/namespace: [2, { allowComputed: true }] */

import assert from 'assert';
import * as REGEX from './index.js';
Expand Down
Loading

0 comments on commit d8683cb

Please sign in to comment.