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

CI Release #31

Merged
merged 4 commits into from
Dec 11, 2019
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "airbnb",
"extends": "airbnb-base",
"parserOptions": {
"sourceType": "script"
},
Expand Down
35 changes: 29 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,40 @@ cache:
notifications:
email: false
node_js:
- 'lts/*'
- "10.15.3"
- "10.16.0"
- "11.15.0"
- "12.13.1"
- "13.3.0"
- "lts/*"
- node
before_script:
- greenkeeper-lockfile-update

after_script: greenkeeper-lockfile-upload
install: npm install

# after_success:
# - npm run travis-deploy-once "npm run semantic-release"
branches:
except:
- /^v\d+\.\d+\.\d+$/

#override npm ci for now
install: npm install
stages:
- lint
- test
- coverage
- release

jobs:
include:
- stage: lint
script: npm run lint
- stage: test
script: npm test
- stage: coverage
script: npm run coverage
- stage: release
node_js: node
deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release
4 changes: 2 additions & 2 deletions lib/AttachmentCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class AttachmentCreator {
attachment.title = `[${platform.toUpperCase()}] Query results for: "${query}"`;

const nexusComponents = components
.filter(component => component && component.components && component.components[0].type === 'nexus-v2');
.filter((component) => component && component.components && component.components[0].type === 'nexus-v2');

const marketComponents = components
.filter(component => component && component.type === 'market-v1' && typeof component.prices.soldPrice !== 'undefined');
.filter((component) => component && component.type === 'market-v1' && typeof component.prices.soldPrice !== 'undefined');
if (nexusComponents.length > 0) {
nexusComponents.forEach((nexusComponent) => {
attachment.title = `[${platform.toUpperCase()}] ${nexusComponent.title}`;
Expand Down
2 changes: 1 addition & 1 deletion lib/market/v1/MarketFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MarketFetcher {
};
const res = await request.get(`${this.urls.market}${this.urls.marketBasePath}${urlName}`, reqOpts);
const data = res.payload ? await Promise.all(res.payload.item.items_in_set
.map(item => this.summaryForItem(item))) : {};
.map((item) => this.summaryForItem(item))) : {};
return data;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/market/v1/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Summary {
+ `Minimum ${this.prices.minimum} | Maximum ${this.prices.maximum}\n`;
}
if (opt === 'location' || opt === 'all') {
value += `${this.pad(`Drops: ${this.drops.map(drop => drop.name).join(', ')}`, 15)}\n`;
value += `${this.pad(`Drops: ${this.drops.map((drop) => drop.name).join(', ')}`, 15)}\n`;
}
value += `\`\`\`\n${this.wikiUrl}`;
return `\u221F${value}`;
Expand Down
2 changes: 1 addition & 1 deletion lib/nexus/v1/NexusFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class NexusFetcher {
successfulQuery = queryResults.name;
queryResults.type = nexusItem.type;
queryResults.parts = nexusItem.components
.map(component => ({ name: component.name, ducats: component.ducats }));
.map((component) => ({ name: component.name, ducats: component.ducats }));
queryResults.item = nexusItem;
attachments = [new NexusItem(queryResults, nexusResults[0].webUrl, this.settings)];
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/nexus/v1/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Component {
minimum: Math.min(data.buying.min, data.selling.max),
maximum: Math.max(data.buying.max, data.selling.max),
};
this.ducats = (items.filter(item => item.name === data.name)[0] || { ducats: 0 }).ducats;
this.ducats = (items.filter((item) => item.name === data.name)[0] || { ducats: 0 }).ducats;
this.type = 'nexus-v1';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/nexus/v2/NexusFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NexusFetcher {
successfulQuery = queryResults.name;
queryResults.type = nexusItem.type;
queryResults.parts = nexusItem.components
.map(component => ({ name: component.name.replace(platform, '').trim() }));
.map((component) => ({ name: component.name.replace(platform, '').trim() }));
queryResults.item = nexusItem;
attachments = [new NexusItem(queryResults, nexusResults[0].webUrl, this.settings)];
} else {
Expand Down
Loading