Skip to content

Commit

Permalink
Merge pull request #7375 from jrjohnson/update-ember-5.1
Browse files Browse the repository at this point in the history
Update Ember to 5.2
  • Loading branch information
stopfstedt committed Sep 1, 2023
2 parents 378ba2a + 7bb5543 commit a05335a
Show file tree
Hide file tree
Showing 178 changed files with 119,989 additions and 45,083 deletions.
12 changes: 0 additions & 12 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# 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
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ module.exports = {
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': [2, 'except-simple'],
},
},
],
};
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
Expand All @@ -41,7 +41,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16, 18]

steps:
- uses: actions/checkout@v3
Expand All @@ -61,7 +61,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Install Node
Expand All @@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
cache: npm
- name: install dependencies
run: npm ci
Expand All @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
cache: npm
- run: npm ci
- run: npm test
Expand All @@ -117,7 +117,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
cache: npm
- run: npm ci
- run: npm run build
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log
Expand All @@ -25,7 +19,6 @@ sauce-example.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# 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
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
6 changes: 3 additions & 3 deletions app/components/bulk-new-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class BulkNewUsersComponent extends Component {
const notHeaderRow = proposedUsers.filter(
(obj) =>
String(obj.firstName).toLowerCase() !== 'first' ||
String(obj.lastName).toLowerCase() !== 'last'
String(obj.lastName).toLowerCase() !== 'last',
);
resolve(notHeaderRow);
};
Expand Down Expand Up @@ -253,7 +253,7 @@ export default class BulkNewUsersComponent extends Component {
(obj) =>
!userErrors.includes(obj) &&
isPresent(obj.authentication) &&
obj.authentication.get('isError')
obj.authentication.get('isError'),
);
this.savingUserErrors = [...this.savingUserErrors, ...userErrors];
this.savingAuthenticationErrors = [
Expand Down Expand Up @@ -309,7 +309,7 @@ export default class BulkNewUsersComponent extends Component {
obj.duration = program.duration;

return obj;
})
}),
);

const lastYear = parseInt(moment().subtract(1, 'year').format('YYYY'), 10);
Expand Down
4 changes: 2 additions & 2 deletions app/components/connection-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class ConnectionStatusComponent extends Component {
{
passive: true,
capture: false,
}
},
);
this.offlineListener = window.addEventListener(
'offline',
Expand All @@ -35,7 +35,7 @@ export default class ConnectionStatusComponent extends Component {
{
passive: true,
capture: false,
}
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/components/courses/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class CoursesListComponent extends Component {
@action
cancelRemove(course) {
this.coursesForRemovalConfirmation = this.coursesForRemovalConfirmation.filter(
(id) => id !== course.id
(id) => id !== course.id,
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/components/courses/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class CoursesNewComponent extends Component {
@restartableTask
*load() {
this.academicYearCrossesCalendarYearBoundaries = yield this.iliosConfig.itemFromConfig(
'academicYearCrossesCalendarYearBoundaries'
'academicYearCrossesCalendarYearBoundaries',
);
if (this.args.currentYear && this.years.includes(parseInt(this.args.currentYear.id, 10))) {
this.setYear(this.args.currentYear.id);
Expand Down
6 changes: 3 additions & 3 deletions app/components/courses/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export default class CoursesRootComponent extends Component {
]);
userModelData = new TrackedAsyncData(this.currentUser.getModel());
crossesBoundaryConfig = new TrackedAsyncData(
this.iliosConfig.itemFromConfig('academicYearCrossesCalendarYearBoundaries')
this.iliosConfig.itemFromConfig('academicYearCrossesCalendarYearBoundaries'),
);

@cached
get coursesInSelectedSchoolData() {
return new TrackedAsyncData(
this.preloadedCoursesInSelectedSchool ? this.selectedSchool?.courses : []
this.preloadedCoursesInSelectedSchool ? this.selectedSchool?.courses : [],
);
}

Expand Down Expand Up @@ -111,7 +111,7 @@ export default class CoursesRootComponent extends Component {
get filteredCourses() {
if (this.args.userCoursesOnly) {
return this.coursesFilteredByTitle.filter((course) =>
this.allRelatedCourses?.includes(course)
this.allRelatedCourses?.includes(course),
);
}
return this.coursesFilteredByTitle;
Expand Down
2 changes: 1 addition & 1 deletion app/components/curriculum-inventory/new-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class CurriculumInventoryNewReportComponent extends Component {
const years = [];
const currentYear = new Date().getFullYear();
this.academicYearCrossesCalendarYearBoundaries = yield this.iliosConfig.itemFromConfig(
'academicYearCrossesCalendarYearBoundaries'
'academicYearCrossesCalendarYearBoundaries',
);
for (let id = currentYear - 5, n = currentYear + 5; id <= n; id++) {
let title = id.toString();
Expand Down
2 changes: 1 addition & 1 deletion app/components/curriculum-inventory/report-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class CurriculumInventoryReportListItemComponent extends Componen
@tracked showConfirmRemoval;
isFinalized = this.args.report.belongsTo('export').id();
academicYearConfig = new TrackedAsyncData(
this.iliosConfig.itemFromConfig('academicYearCrossesCalendarYearBoundaries')
this.iliosConfig.itemFromConfig('academicYearCrossesCalendarYearBoundaries'),
);

@use canDelete = new PermissionChecker(() => [
Expand Down
2 changes: 1 addition & 1 deletion app/components/curriculum-inventory/report-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class CurriculumInventoryReportOverviewComponent extends Componen
const program = yield this.args.report.program;
const school = yield program.school;
this.academicYearCrossesCalendarYearBoundaries = yield this.iliosConfig.itemFromConfig(
'academicYearCrossesCalendarYearBoundaries'
'academicYearCrossesCalendarYearBoundaries',
);
this.canRollover = yield this.permissionChecker.canCreateCurriculumInventoryReport(school);
const yearOptions = [];
Expand Down
2 changes: 1 addition & 1 deletion app/components/curriculum-inventory/report-rollover.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class CurriculumInventoryReportRolloverComponent extends Componen
@restartableTask
*load() {
const academicYearCrossesCalendarYearBoundaries = yield this.iliosConfig.itemFromConfig(
'academicYearCrossesCalendarYearBoundaries'
'academicYearCrossesCalendarYearBoundaries',
);
const thisYear = new Date().getFullYear();
const reportYear = parseInt(this.args.report.year, 10);
Expand Down
2 changes: 1 addition & 1 deletion app/components/curriculum-inventory/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default class CurriculumInventoryReportsComponent extends Component {

if (this.selectedSchool) {
this.canCreate = yield this.permissionChecker.canCreateCurriculumInventoryReport(
this.selectedSchool
this.selectedSchool,
);
const programs = yield this.selectedSchool.programs;
this.programs = sortBy(programs.slice(), 'title');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class SequenceBlockSessionManagerComponent extends Component {
changeSession(session) {
if (this.linkedSessions.includes(session)) {
this.linkedSessions = this.linkedSessions.filter(
(linkedSession) => linkedSession !== session
(linkedSession) => linkedSession !== session,
);
} else {
this.linkedSessions = [...this.linkedSessions, session];
Expand All @@ -97,7 +97,7 @@ export default class SequenceBlockSessionManagerComponent extends Component {
excludeSession(session) {
if (this.excludedSessions.includes(session)) {
this.excludedSessions = this.excludedSessions.filter(
(excludedSession) => excludedSession !== session
(excludedSession) => excludedSession !== session,
);
} else {
this.excludedSessions = [...this.excludedSessions, session];
Expand Down
6 changes: 3 additions & 3 deletions app/components/global-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export default class GlobalSearchComponent extends Component {

get filteredResults() {
return this.yearFilteredResults.filter(
(course) => !this.ignoredSchoolTitles.includes(course.school)
(course) => !this.ignoredSchoolTitles.includes(course.school),
);
}

get paginatedResults() {
return this.filteredResults.slice(
this.args.page * this.size - this.size,
this.args.page * this.size
this.args.page * this.size,
);
}

Expand All @@ -72,7 +72,7 @@ export default class GlobalSearchComponent extends Component {
results: 0,
};
}),
'title'
'title',
);
const options = this.results.reduce((set, course) => {
const schoolOption = findBy(set, 'title', course.school);
Expand Down
2 changes: 1 addition & 1 deletion app/components/instructor-groups/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class LearnerGroupListComponent extends Component {
return instructorGroups.sort((a, b) =>
a.title.localeCompare(b.title, locale, {
numeric: true,
})
}),
);
}
if (sortBy.includes('courses')) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/instructor-groups/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class InstructorGroupsRootComponent extends Component {
school: schoolId,
},
}),
])
]),
);
}
const arr = await this.instructorGroupPromises.get(schoolId);
Expand Down
2 changes: 1 addition & 1 deletion app/components/learner-group/cohort-user-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class LearnerGroupCohortUserManagerComponent extends Component {
@action
toggleUserSelectionAllOrNone() {
const unselectedFilteredUsers = this.filteredUsers.filter(
(user) => !this.selectedUsers.includes(user)
(user) => !this.selectedUsers.includes(user),
);
if (this.filteredUsers && unselectedFilteredUsers.length) {
this.selectedUsers = [...this.selectedUsers, ...unselectedFilteredUsers];
Expand Down
2 changes: 1 addition & 1 deletion app/components/learner-group/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class LearnerGroupUserMembersComponent extends Component {
get usersInGroup() {
return this.args.users.filter(
(user) => user.get('lowestGroupInTree').id === this.args.learnerGroupId
(user) => user.get('lowestGroupInTree').id === this.args.learnerGroupId,
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/learner-group/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default class LearnerGroupRootComponent extends Component {
learnerGroup,
cohort,
withLearners,
parentGroup
parentGroup,
);
// indicate that the top group is a copy
newGroups[0].title = newGroups[0].title + ` (${this.intl.t('general.copy')})`;
Expand Down
Loading

0 comments on commit a05335a

Please sign in to comment.