Skip to content

Commit

Permalink
Upgrade Ember from 3.19 to 3.20
Browse files Browse the repository at this point in the history
- fix problem with deprecated autotracking for @sort computed property (see emberjs/ember.js#19101
- replace relative environment config file import (ex: '../config/environment') by namespace import (ex: 'pix-certif/config/environment') in order to simplify future upgrade
- add ember-cli-update.json file in order to improve upgrade experience
- fix problem with Ember Mirage request object that now use PascalCase HTTP headers instead of greek-case request headers
- bump dependencies rspecting Ember CLI Update program
  • Loading branch information
jbuget authored Sep 23, 2020
1 parent 69e27d0 commit 1701a92
Show file tree
Hide file tree
Showing 8 changed files with 4,855 additions and 1,837 deletions.
2 changes: 1 addition & 1 deletion certif/app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from 'pix-certif/config/environment';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
6 changes: 3 additions & 3 deletions certif/app/controllers/authenticated/sessions/list.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { notEmpty } from '@ember/object/computed';
import { sort } from '@ember/object/computed';
import { notEmpty, sort } from '@ember/object/computed';

const SORTING_ORDER = ['date:desc', 'time:desc'];

export default class SessionsListController extends Controller {
sortingOrder = SORTING_ORDER;

@notEmpty('model') hasSession;
@sort('model', 'sortingOrder') sortedSessions;

@sort('model.[]', 'sortingOrder') sortedSessions;

@action
goToDetails(session) {
Expand Down
2 changes: 1 addition & 1 deletion certif/app/router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import config from 'pix-certif/config/environment';

const Router = EmberRouter.extend({
location: config.locationType,
Expand Down
2 changes: 1 addition & 1 deletion certif/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.19.0",
"version": "3.20.2",
"blueprints": [
{
"name": "app",
Expand Down
2 changes: 1 addition & 1 deletion certif/mirage/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function() {
});

this.get('/users/me', (schema, request) => {
const userToken = request.requestHeaders.authorization.replace('Bearer ', '');
const userToken = request.requestHeaders['Authorization'].replace('Bearer ', '');
const userId = JSON.parse(atob(userToken.split('.')[1])).user_id;

return schema.users.find(userId);
Expand Down
6,650 changes: 4,834 additions & 1,816 deletions certif/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions certif/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,32 @@
"@fortawesome/free-brands-svg-icons": "^5.13.0",
"@fortawesome/free-regular-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@glimmer/component": "^1.0.0",
"@glimmer/component": "^1.0.1",
"@glimmer/tracking": "^1.0.0",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.3",
"ember-cli": "~3.19.0",
"ember-auto-import": "^1.6.0",
"ember-cli": "~3.20.2",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.20.5",
"ember-cli-clipboard": "^0.13.0",
"ember-cli-babel": "^7.21.0",
"ember-cli-clipboard": "^0.15.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-google-fonts": "^2.16.2",
"ember-cli-htmlbars": "^5.1.2",
"ember-cli-htmlbars": "^5.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-matomo-tag-manager": "^1.1.2",
"ember-cli-mirage": "^1.1.6",
"ember-cli-mirage": "^1.1.8",
"ember-cli-moment-shim": "^3.7.1",
"ember-cli-notifications": "^6.2.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^2.0.2",
"ember-cli-uglify": "^3.0.0",
"ember-composable-helpers": "^3.1.1",
"ember-data": "~3.19.0",
"ember-data": "~3.20.0",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^7.0.1",
"ember-fetch": "^8.0.2",
"ember-file-upload": "^2.7.1",
"ember-flatpickr": "^2.15.4",
"ember-inputmask": "^0.9.3",
Expand All @@ -76,10 +76,10 @@
"ember-resolver": "^7.0.0",
"ember-simple-auth": "^3.0.0",
"ember-sinon": "^5.0.0",
"ember-source": "~3.19.0",
"ember-source": "~3.20.2",
"ember-truth-helpers": "^2.1.0",
"eslint": "^7.1.0",
"eslint-plugin-ember": "^8.6.0",
"eslint": "^7.5.0",
"eslint-plugin-ember": "^8.9.1",
"faker": "^4.1.0",
"loader.js": "^4.7.0",
"lodash": "^4.17.15",
Expand Down
4 changes: 2 additions & 2 deletions certif/tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Application from '../app';
import config from '../config/environment';
import Application from 'pix-certif/app';
import config from 'pix-certif/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

Expand Down

0 comments on commit 1701a92

Please sign in to comment.