Skip to content

Commit 9b4aaf5

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fastboot-index
2 parents 380b07d + 1608869 commit 9b4aaf5

File tree

89 files changed

+38278
-10144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+38278
-10144
lines changed

.dependabot/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: "javascript"
4+
directory: "/"
5+
update_schedule: "weekly"
6+
version_requirement_updates: "increase_versions"
7+
commit_message:
8+
prefix: ""

.template-lintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = {
77

88
rules: {
99
'img-alt-attributes': false,
10-
'triple-curlies': false,
11-
'html-comments': false,
10+
'no-html-comments': false,
11+
'no-unnecessary-concat': false,
12+
quotes: false,
1213
},
1314
};

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ language: rust
22
sudo: required
33
dist: xenial
44

5+
branches:
6+
only:
7+
- auto
8+
- try
9+
- master
10+
511
cache:
612
cargo: true
713
directories:
@@ -21,7 +27,7 @@ env:
2127
- PERCY_PROJECT=crates-io/crates.io
2228
- PGPORT=5433
2329
- PATH=$HOME/.cargo/bin:$PATH
24-
- RUSTFLAGS="-C debuginfo=0"
30+
- RUSTFLAGS="-C debuginfo=0 -D warnings"
2531

2632
install:
2733
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf

Cargo.lock

Lines changed: 6 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ derive_deref = "1.0.0"
6060
reqwest = "0.9.1"
6161
tempdir = "0.3.7"
6262
parking_lot = "0.7.1"
63-
jemallocator = { version = "0.1.8", features = ['unprefixed_malloc_on_supported_platforms', 'profiling'] }
64-
jemalloc-ctl = "0.2.0"
63+
jemallocator = { version = "0.3", features = ['unprefixed_malloc_on_supported_platforms', 'profiling'] }
6564

6665
lettre = "0.9"
6766
lettre_email = "0.9"

app/components/api-token-row.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ export default Component.extend({
77
serverError: null,
88

99
didInsertElement() {
10-
if (this.get('api_token.isNew')) {
11-
this.$('input').focus();
10+
let input = this.element.querySelector('input');
11+
if (input && input.focus) {
12+
input.focus();
1213
}
1314
},
1415

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { computed } from '@ember/object';
2+
import { alias } from '@ember/object/computed';
3+
import Component from '@ember/component';
4+
5+
export default Component.extend({
6+
tagName: 'span',
7+
classNames: ['badge'],
8+
repository: alias('badge.attributes.repository'),
9+
branch: computed('badge.attributes.branch', function() {
10+
return encodeURIComponent(this.get('badge.attributes.branch'));
11+
}),
12+
text: computed('badge.attributes.branch', function() {
13+
const branch = this.get('badge.attributes.branch');
14+
return `Bitbucket Pipelines build status for the ${branch} branch`;
15+
}),
16+
});

app/components/owned-crate-row.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
4+
5+
export default Component.extend({
6+
tagName: 'li',
7+
8+
name: alias('ownedCrate.name'),
9+
controlId: computed('ownedCrate.id', function() {
10+
return `${this.ownedCrate.id}-email-notifications`;
11+
}),
12+
emailNotifications: alias('ownedCrate.email_notifications'),
13+
14+
actions: {
15+
toggleEmailNotifications() {
16+
this.set('emailNotifications', !this.get('emailNotifications'));
17+
},
18+
},
19+
});

app/controllers/crate/version.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,19 @@ export default Controller.extend({
7070
}
7171

7272
return PromiseArray.create({
73-
promise: deps.then(deps => {
74-
return deps.filter(dep => dep.get('kind') !== 'dev').uniqBy('crate_id');
75-
}),
73+
promise: deps.then(deps => deps.filterBy('kind', 'normal').uniqBy('crate_id')),
74+
});
75+
}),
76+
77+
currentBuildDependencies: computed('currentVersion.dependencies', function() {
78+
let deps = this.get('currentVersion.dependencies');
79+
80+
if (deps === null) {
81+
return [];
82+
}
83+
84+
return PromiseArray.create({
85+
promise: deps.then(deps => deps.filterBy('kind', 'build').uniqBy('crate_id')),
7686
});
7787
}),
7888

@@ -82,9 +92,7 @@ export default Controller.extend({
8292
return [];
8393
}
8494
return PromiseArray.create({
85-
promise: deps.then(deps => {
86-
return deps.filterBy('kind', 'dev');
87-
}),
95+
promise: deps.then(deps => deps.filterBy('kind', 'dev').uniqBy('crate_id')),
8896
});
8997
}),
9098

app/controllers/me/index.js

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Controller from '@ember/controller';
2-
import { sort, filterBy, notEmpty } from '@ember/object/computed';
2+
import { alias, sort, filterBy, notEmpty } from '@ember/object/computed';
33
import { inject as service } from '@ember/service';
4+
import ajax from 'ember-fetch/ajax';
45

56
export default Controller.extend({
67
// eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
@@ -12,10 +13,50 @@ export default Controller.extend({
1213

1314
isResetting: false,
1415

16+
ownedCrates: alias('model.ownedCrates'),
17+
1518
newTokens: filterBy('model.api_tokens', 'isNew', true),
1619
disableCreate: notEmpty('newTokens'),
1720

21+
emailNotificationsError: false,
22+
emailNotificationsSuccess: false,
23+
24+
setAllEmailNotifications(value) {
25+
this.get('ownedCrates').forEach(c => {
26+
c.set('email_notifications', value);
27+
});
28+
},
29+
1830
actions: {
31+
async saveEmailNotifications() {
32+
try {
33+
await ajax(`/api/v1/me/email_notifications`, {
34+
method: 'PUT',
35+
body: JSON.stringify(
36+
this.get('ownedCrates').map(c => ({
37+
id: parseInt(c.id, 10),
38+
email_notifications: c.email_notifications,
39+
})),
40+
),
41+
});
42+
this.setProperties({
43+
emailNotificationsError: false,
44+
emailNotificationsSuccess: true,
45+
});
46+
} catch (err) {
47+
console.error(err);
48+
this.setProperties({
49+
emailNotificationsError: true,
50+
emailNotificationsSuccess: false,
51+
});
52+
}
53+
},
54+
emailNotificationsSelectAll() {
55+
this.setAllEmailNotifications(true);
56+
},
57+
emailNotificationsSelectNone() {
58+
this.setAllEmailNotifications(false);
59+
},
1960
startNewToken() {
2061
this.store.createRecord('api-token', {
2162
created_at: new Date(Date.now() + 2000),

0 commit comments

Comments
 (0)