Skip to content

Commit

Permalink
BREAKING CHANGES: major bump upgrade [email protected] (#844)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuta Kaneda <[email protected]>
Co-authored-by: Ibuki Miyagami <[email protected]>
Co-authored-by: Haruka Kawamura <[email protected]>
Co-authored-by: y-oksaku <[email protected]>
Co-authored-by: ibu1224 <[email protected]>
Co-authored-by: Ibuki Miyagami <[email protected]>
Co-authored-by: Keisuke Kumada <[email protected]>
Co-authored-by: imiyagam <[email protected]>
Co-authored-by: Ibuki <[email protected]>
  • Loading branch information
10 people authored Feb 21, 2023
1 parent ae0ec8e commit f1f68c5
Show file tree
Hide file tree
Showing 455 changed files with 69,584 additions and 40,504 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
humanizeDuration: true
},
rules: {
'no-return-assign': 'off',
'no-underscore-dangle': 'off',
'prefer-const': 'off',
'prefer-destructuring': [
Expand Down Expand Up @@ -55,6 +56,17 @@ module.exports = {
'ember/no-new-mixins': 'off',
'ember/no-observers': 'off',
'ember/no-side-effects': 'off',
'ember/no-classic-classes': 'off',
'ember/no-get': 'off',
'ember/no-mixins': 'off',
'ember/use-ember-data-rfc-395-imports': 'off',
'ember/no-actions-hash': 'off',
'ember/no-controller-access-in-routes': 'off',
'ember/no-component-lifecycle-hooks': 'off',
'ember/no-classic-components': 'off',
'ember/require-tagless-components': 'off',
'ember/use-brace-expansion': 'off',
'ember/no-invalid-dependent-keys': 'off',
'ember/no-arrow-function-computed-properties': [
'error',
{ onlyThisContexts: true }
Expand All @@ -73,6 +85,7 @@ module.exports = {
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
Expand All @@ -88,7 +101,12 @@ module.exports = {
browser: false,
node: true
},
// plugins: ['node'],
// extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
// 'node/no-unpublished-require': 'off',
'func-names': 'off'
}
},
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand All @@ -22,11 +23,18 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

.DS_STORE
.*.swp
.travis.yml
config/local.js

Dockerfile.local
ssl

# broccoli-debug
/DEBUG/
25 changes: 25 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true
};
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ This README outlines the details of collaborating on this Ember application.
You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) >= v6.0.0 (with NPM)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/) (for testing)
* [Node.js](https://nodejs.org/) (with npm)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)

## Installation
```bash
Expand Down Expand Up @@ -67,9 +67,8 @@ To see coverage results, run:

### Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`
* `npm run lint`
* `npm run lint:fix`

### Building

Expand All @@ -83,7 +82,7 @@ Make use of the many generators for code, try `ember help generate` for more det
## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
Expand Down
20 changes: 10 additions & 10 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import Application from '@ember/application';
import loadInitializers from 'ember-load-initializers';
import { run } from '@ember/runloop';
import { _backburner } from '@ember/runloop';
import Resolver from 'ember-resolver';
import config from './config/environment';
import config from 'screwdriver-ui/config/environment';

const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
export default class App extends Application {
modulePrefix = config.modulePrefix;

podModulePrefix = config.podModulePrefix;

Resolver = Resolver;
}

loadInitializers(App, config.modulePrefix);

if (config.environment === 'development') {
run.backburner.DEBUG = true;
_backburner.DEBUG = true;
}

export default App;
10 changes: 4 additions & 6 deletions app/application/adapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import RESTAdapter from '@ember-data/adapter/rest';
import { inject as service } from '@ember/service';
import { pluralize } from 'ember-inflector';
import DS from 'ember-data';
import ENV from 'screwdriver-ui/config/environment';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';

Expand All @@ -9,7 +9,7 @@ const urlPathParser = new RegExp(
`/${ENV.APP.SDAPI_NAMESPACE}/([^/]+)(/([^/]+))?(/([^/]+))?`
);

export default DS.RESTAdapter.extend(DataAdapterMixin, {
export default RESTAdapter.extend(DataAdapterMixin, {
session: service('session'),
namespace: ENV.APP.SDAPI_NAMESPACE,
host: ENV.APP.SDAPI_HOSTNAME,
Expand All @@ -26,10 +26,8 @@ export default DS.RESTAdapter.extend(DataAdapterMixin, {
ajax(url, method, hash) {
const finalHash = hash || {};

finalHash.credentials = 'include';
finalHash.crossDomain = true;
finalHash.xhrFields = {
withCredentials: true
};

return this._super(url, method, finalHash);
},
Expand Down Expand Up @@ -139,7 +137,7 @@ export default DS.RESTAdapter.extend(DataAdapterMixin, {
return this._super(status, headers, { errors }, requestData);
}

let data = {};
const data = {};

let key;

Expand Down
6 changes: 3 additions & 3 deletions app/application/controller.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
const { alias } = computed;
import { alias } from '@ember/object/computed';

export default Controller.extend({
router: service(),
showCreatePipeline: false,
collections: [],
session: service(),
Expand All @@ -15,7 +15,7 @@ export default Controller.extend({
return this.session.invalidate();
},
search(params) {
this.transitionToRoute('search', { queryParams: { query: params } });
this.router.transitionTo('search', { queryParams: { query: params } });
},
authenticate(scmContext) {
const { session } = this;
Expand Down
2 changes: 1 addition & 1 deletion app/application/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default Route.extend(ApplicationRouteMixin, {
}
),
title(tokens) {
let arr = Array.isArray(tokens) ? tokens : [];
const arr = Array.isArray(tokens) ? tokens : [];

arr.push('screwdriver.cd');

Expand Down
27 changes: 13 additions & 14 deletions app/application/template.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{{app-header
currentUrl=currentUrl
scmContexts=scmContexts
session=session
showCreatePipeline=showCreatePipeline
authenticate=(action "authenticate")
onInvalidate=(action "invalidateSession")
searchPipelines=(action "search")
}}
{{nav-banner}}
<AppHeader
@currentUrl={{this.currentUrl}}
@scmContexts={{this.scmContexts}}
@session={{this.session}}
@showCreatePipeline={{this.showCreatePipeline}}
@authenticate={{action "authenticate"}}
@onInvalidate={{action "invalidateSession"}}
@searchPipelines={{action "search"}}
/>
<NavBanner />

<div id="appContainer" class="container-fluid">
{{outlet}}
</div>

{{#if showCreatePipeline}}
{{create-pipeline
showCreatePipeline=showCreatePipeline}}
{{#if this.showCreatePipeline}}
<CreatePipeline @showCreatePipeline={{this.showCreatePipeline}} />
{{/if}}

{{feedback}}
{{this.feedback}}
5 changes: 2 additions & 3 deletions app/authenticators/screwdriver-api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isEmpty } from '@ember/utils';
import { get } from '@ember/object';
import { inject as service } from '@ember/service';
import $ from 'jquery';
import { Promise as EmberPromise } from 'rsvp';
Expand Down Expand Up @@ -68,7 +67,7 @@ export default Base.extend({
*/
restore(data) {
return new EmberPromise((resolve, reject) => {
const jwt = get(data, 'token');
const jwt = data.token;

if (!isEmpty(jwt)) {
const decodedJWT = decoder(jwt);
Expand Down Expand Up @@ -97,7 +96,7 @@ export default Base.extend({
const scm = this.scmService;

return new EmberPromise((resolve, reject) => {
let url = [loginUrlBase];
const url = [loginUrlBase];

if (scmContext) {
url.push(scmContext);
Expand Down
7 changes: 3 additions & 4 deletions app/build-history/model.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import DS from 'ember-data';
const { Model } = DS;
import Model, { attr } from '@ember-data/model';

export default Model.extend({
jobId: DS.attr('number'),
builds: DS.attr()
jobId: attr('number'),
builds: attr()
});
4 changes: 2 additions & 2 deletions app/build-history/serializer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DS from 'ember-data';
import RESTSerializer from '@ember-data/serializer/rest';

export default DS.RESTSerializer.extend({
export default RESTSerializer.extend({
primaryKey: 'jobId',

modelNameFromPayloadKey(/* key */) {
Expand Down
2 changes: 1 addition & 1 deletion app/build-logs/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default Service.extend({
this.setCache(buildId, stepName, { done });

if (lines.length) {
let existings = this.getCache(buildId, stepName, 'logs') || [];
const existings = this.getCache(buildId, stepName, 'logs') || [];

this.setCache(buildId, stepName, {
nextLine: inProgress
Expand Down
4 changes: 2 additions & 2 deletions app/build/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import BaseAdapter from 'screwdriver-ui/application/adapter';
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`;
const url = `${ENV.APP.SDAPI_HOSTNAME}/${ENV.APP.SDAPI_NAMESPACE}/jobs/${data.jobId}/latestBuild`;

let query = { status: data.status };
const query = { status: data.status };

return this.ajax(url, 'GET', { data: query });
}
Expand Down
Loading

0 comments on commit f1f68c5

Please sign in to comment.