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

fix(1684): update ember to 3.16 #576

Merged
merged 16 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from 9 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
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
14 changes: 13 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: ['ember', 'prettier'],
extends: [
Expand Down Expand Up @@ -45,6 +51,9 @@ module.exports = {
'ember/avoid-leaking-state-in-ember-objects': 'off',
'ember/jquery-ember-run': 'off',
'ember/no-global-jquery': 'off',
'ember/no-jquery': 'off',
'ember/no-new-mixins': 'off',
'ember/no-observers': 'off',
'ember/no-side-effects': 'off',
'prettier/prettier': 'error'
},
Expand All @@ -61,6 +70,9 @@ module.exports = {
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
Expand Down
2 changes: 2 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
Expand Down
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
jithine marked this conversation as resolved.
Show resolved Hide resolved
language: node_js
node_js:
- "10"

dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

branches:
only:
- master

script:
- npm run lint:hbs
- npm run lint:js
- npm test
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import loadInitializers from 'ember-load-initializers';
import { run } from '@ember/runloop';
import Resolver from './resolver';
import Resolver from 'ember-resolver';
import config from './config/environment';

const App = Application.extend({
Expand Down
1 change: 1 addition & 0 deletions app/application/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export default DS.RESTAdapter.extend(DataAdapterMixin, {
}

let data = {};

let key;

const requestUrl = new URL(requestData.url);
Expand Down
1 change: 1 addition & 0 deletions app/build-artifact/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function changeFiles(tree) {
*/
function arrangeIntoTree(paths, baseUrl) {
const tree = [];

let currentLevel;

paths.forEach(path => {
Expand Down
1 change: 1 addition & 0 deletions app/build-logs/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default Service.extend({
started = false
}) {
let lines = [];

let done = false;
const inProgress = sortOrder === 'ascending';

Expand Down
1 change: 1 addition & 0 deletions app/build/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default BaseAdapter.extend({
queryRecord(store, type, data) {
this.modelKey = 'build';
let url = `${ENV.APP.SDAPI_HOSTNAME}/${ENV.APP.SDAPI_NAMESPACE}/jobs/${data.jobId}/latestBuild`;

let query = { status: data.status };

return this.ajax(url, 'GET', { data: query });
Expand Down
1 change: 1 addition & 0 deletions app/build/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import DS from 'ember-data';
*/
function calcDuration(start, end) {
let endTime = new Date();

let startTime = this.get(start);

if (end !== 'now') {
Expand Down
1 change: 1 addition & 0 deletions app/command/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default Service.extend({
},
getAllCommands(namespace) {
const url = `${ENV.APP.SDAPI_HOSTNAME}/${ENV.APP.SDAPI_NAMESPACE}/commands`;

let params = { compact: true, sortBy: 'createTime' };

if (namespace) {
Expand Down
2 changes: 2 additions & 0 deletions app/commands/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default Controller.extend({
routeParams: computed('model', {
get() {
let route = this.model;

let params = Object.assign(
{},
route.paramsFor('commands.namespace'),
Expand All @@ -17,6 +18,7 @@ export default Controller.extend({
crumbs: computed('routeParams', {
get() {
let breadcrumbs = [];

let params = this.routeParams;

if (params.namespace || params.detail) {
Expand Down
1 change: 1 addition & 0 deletions app/commands/detail/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default Route.extend({
this.command.getCommandTags(params.namespace, params.name)
]).then(arr => {
const [verPayload, tagPayload] = arr;

let version;

if (params.version) {
Expand Down
2 changes: 2 additions & 0 deletions app/components/artifact-tree/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default Component.extend({
const artifactPath = this.getWithDefault('selectedArtifact', '');
const paths = artifactPath.split('/');
const jstree = this.jstreeActionReceiver.target.treeObject.jstree(true);

let nodeList = jstree.get_json();

let targetNode = null;

// traversing jstree to find target artifact node
Expand Down
1 change: 1 addition & 0 deletions app/components/build-log/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default Component.extend({
}),
getPageSize(fetchMax = false) {
const { totalLine, inProgress, justFinished } = this;

let itemSize = this.logService.getCache(this.buildId, this.stepName, 'nextLine') || totalLine;

if (justFinished) {
Expand Down
1 change: 0 additions & 1 deletion app/components/collection-view/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint ember/avoid-leaking-state-in-components: [2, ["sortBy", "selectedPipelines", "searchedPipelines", "selectedSearchedPipelines", "metricsMap"]] */
import { sort } from '@ember/object/computed';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
Expand Down
2 changes: 2 additions & 0 deletions app/components/create-pipeline/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default Component.extend({
checkoutUrl: scmUrl,
rootDir
};

let pipeline;

try {
Expand Down Expand Up @@ -102,6 +103,7 @@ export default Component.extend({
}
} catch (err) {
const { payload: responsePayload } = err;

let { message } = responsePayload;

this.setProperties({
Expand Down
2 changes: 2 additions & 0 deletions app/components/events-thumbnail/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export default Component.extend({
};

const svg = select(this.element.getElementsByTagName('svg')[0]);

let [barSpace, barWidth, paddingLeft, paddingRight] = getParameters(svg);
const totalNumberOfEvents = this.events.length;

let maxDuration = Math.max(...this.events.map(event => event.duration));

if (maxDuration === -Infinity) {
Expand Down
1 change: 0 additions & 1 deletion app/components/loading-view/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint ember/avoid-leaking-state-in-components: [2, ["funnies"]] */
import { computed } from '@ember/object';
import Component from '@ember/component';

Expand Down
2 changes: 1 addition & 1 deletion app/components/pipeline-create-form/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@
delayHide="1000"}}
What is a <a href="https://docs.screwdriver.cd/user-guide/configuration/" target="_blank" rel="noopener">screwdriver.yaml</a>
{{/bs-tooltip}}
</div>
</div>
2 changes: 2 additions & 0 deletions app/components/pipeline-event-row/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default Component.extend({
get() {
const startFrom = this.get('event.startFrom');
const pipelineId = this.get('event.pipelineId');

let isExternal = false;

if (startFrom && startFrom.match(/^~sd@(\d+):([\w-]+)$/)) {
Expand All @@ -65,6 +66,7 @@ export default Component.extend({
// using underscore because router.js doesn't pick up camelcase
/* eslint-disable camelcase */
let pipeline_id = this.get('event.startFrom').match(/^~sd@(\d+):[\w-]+$/);

let build_id = this.get('event.causeMessage').match(/\s(\d+)$/);

if (build_id) {
Expand Down
7 changes: 6 additions & 1 deletion app/components/pipeline-list-view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default Component.extend({
init() {
this._super(...arguments);
const sortedRows = this.getRows(this.jobsDetails);
const table = new Table(this.get('columns'), sortedRows);
const table = Table.create({ columns: this.get('columns'), rows: sortedRows });

let sortColumn = table.get('allColumns').findBy('valuePath', this.get('sortingValuePath'));

// Setup initial sort column
Expand Down Expand Up @@ -146,9 +147,13 @@ export default Component.extend({
const prNumMatch = jobName.match(prRegex);

let duration;

let startTime;

let status;

let buildId;

let coverageData = {};

if (latestBuild) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/pipeline-list-view/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
onSave=(action "startBuild")
onClose=(action "closeModal")}}
{{/modal-dialog}}
{{/if}}
{{/if}}
2 changes: 1 addition & 1 deletion app/components/pipeline-options/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint ember/avoid-leaking-state-in-components: [2, ["jobSorting"]] */
import $ from 'jquery';
import { inject as service } from '@ember/service';
import { not, or, sort } from '@ember/object/computed';
Expand Down Expand Up @@ -124,6 +123,7 @@ export default Component.extend({
},
clearCache(scope, id) {
const pipelineId = this.get('pipeline.id');

let config = {
scope,
cacheId: id,
Expand Down
3 changes: 3 additions & 0 deletions app/components/pipeline-rootdir/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Component from '@ember/component';

export default Component.extend({});
2 changes: 1 addition & 1 deletion app/components/pipeline-rootdir/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
key-up=updateRootDir
}}
</div>
{{/if}}
{{/if}}
2 changes: 1 addition & 1 deletion app/components/pipeline-search-panel/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
</div>
{{/each}}
</div>
</div>
</div>
1 change: 0 additions & 1 deletion app/components/pipeline-secret-settings/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint ember/avoid-leaking-state-in-components: [2, ["secretsSorting"]] */
import { sort } from '@ember/object/computed';
import { computed } from '@ember/object';
import Component from '@ember/component';
Expand Down
2 changes: 2 additions & 0 deletions app/components/pipeline-workflow/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default Component.extend({
const EXTERNAL_TRIGGER_REGEX = /^~?sd@(\d+):([\w-]+)$/;
const edges = get(this, 'directedGraph.edges');
const isTrigger = job ? /(^~)|(^~?sd@)/.test(job.name) : false;

let isRootNode = true;

let toolTipProperties = {};

// Find root nodes to determine position of tooltip
Expand Down
1 change: 0 additions & 1 deletion app/components/search-list/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint ember/avoid-leaking-state-in-components: [2, ["pipelineSorting"]] */
import { computed, get, set } from '@ember/object';
import { empty } from '@ember/object/computed';
import { inject as service } from '@ember/service';
Expand Down
Loading