Skip to content

Commit

Permalink
[ENG-4013] Barium/deprecation this property fallback (#1970)
Browse files Browse the repository at this point in the history
## Purpose

Eliminate this-property-fallback deprecation errors. Might want to review this commit-by-commit. The removal of ember-get-config added a bunch of noise.

## Summary of Changes

1. Upgrade ember-sortable
2. Fix tests that failed this deprecation
3. Upgrade:
    - ember-cli-showdown
    - tag-input
    - Ember-collapsible-panel
    - Ember-content-placeholders
    - Ember-radio-button
4. Remove ember-get-config
5. Move environment.d.ts
6. Fix tests
  • Loading branch information
brianjgeiger authored Aug 30, 2023
1 parent f7803dd commit 9ba7964
Show file tree
Hide file tree
Showing 163 changed files with 511 additions and 382 deletions.
2 changes: 1 addition & 1 deletion app/adapters/crossref-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import DS from 'ember-data';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { support: { supportEmail } } = config;

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/osf-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
import { underscore } from '@ember/string';
import DS from 'ember-data';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import { pluralize } from 'ember-inflector';
import Session from 'ember-simple-auth/services/session';

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/user-password.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import OsfAdapter from './osf-adapter';

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/user-registration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import RESTAdapter from '@ember-data/adapter/rest';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

export default class UserRegistrationAdapter extends RESTAdapter {
host = config.OSF.url.replace(/\/$/, '');
Expand Down
2 changes: 1 addition & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Application from '@ember/application';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import loadInitializers from 'ember-load-initializers';
import Resolver from './resolver';

Expand Down
2 changes: 1 addition & 1 deletion app/application/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import Theme from 'ember-osf-web/services/theme';
import OsfModalState from 'osf-components/services/osf-modal-state';
Expand Down
2 changes: 1 addition & 1 deletion app/authenticators/osf-cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { warn } from '@ember/debug';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Base from 'ember-simple-auth/authenticators/base';
import Session from 'ember-simple-auth/services/session';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion app/const/service-links.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const osfUrl = config.OSF.url;
const serviceLinks = {
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { all, restartableTask, task, timeout } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import $ from 'jquery';
import Media from 'ember-responsive';

Expand Down
2 changes: 1 addition & 1 deletion app/decorators/check-auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Route from '@ember/routing/route';
import { inject as service, Registry as ServiceRegistry } from '@ember/service';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import { NotLoggedIn } from 'ember-osf-web/errors';
import CurrentUser from 'ember-osf-web/services/current-user';
Expand Down
2 changes: 1 addition & 1 deletion app/error-no-api/controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Controller from '@ember/controller';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

export default class NoAPI extends Controller {
supportEmail = config.support.supportEmail;
Expand Down
2 changes: 1 addition & 1 deletion app/guid-node/registrations/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task } from 'ember-concurrency';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Media from 'ember-responsive';

import Node from 'ember-osf-web/models/node';
Expand Down
2 changes: 1 addition & 1 deletion app/home/-components/hero-banner/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import { layout } from 'ember-osf-web/decorators/component';

Expand Down
2 changes: 1 addition & 1 deletion app/home/-components/integrations-section/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { featureFlagNames: { ABTesting } } = config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@ember/component';

import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
OSF: {
Expand Down
2 changes: 1 addition & 1 deletion app/home/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { featureFlagNames: { ABTesting } } = config;

Expand Down
2 changes: 1 addition & 1 deletion app/instance-initializers/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Features from 'ember-feature-flags/services/features';
import { Blocker } from 'ember-osf-web/services/ready';
import transitionTargetURL from 'ember-osf-web/utils/transition-target-url';

import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
featureFlagNames: {
Expand Down
2 changes: 1 addition & 1 deletion app/models/user-registration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { alias } from '@ember/object/computed';
import Model, { attr } from '@ember-data/model';
import { buildValidations, validator } from 'ember-cp-validations';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { support: { supportEmail } } = config;

Expand Down
2 changes: 1 addition & 1 deletion app/models/user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { attr, belongsTo, hasMany, AsyncHasMany } from '@ember-data/model';
import { alias } from '@ember/object/computed';
import { buildValidations, validator } from 'ember-cp-validations';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import { Link } from 'jsonapi-typescript';

import SparseNodeModel from 'ember-osf-web/models/sparse-node';
Expand Down
2 changes: 1 addition & 1 deletion app/not-found/controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Controller from '@ember/controller';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

export default class NotFound extends Controller {
supportEmail = config.support.supportEmail;
Expand Down
2 changes: 1 addition & 1 deletion app/register/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import QueryParams from 'ember-parachute';

import PreprintProvider from 'ember-osf-web/models/preprint-provider';
Expand Down
2 changes: 1 addition & 1 deletion app/resolve-guid/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import RouterService from '@ember/routing/router-service';

import { notFoundURL } from 'ember-osf-web/utils/clean-url';
Expand Down
2 changes: 1 addition & 1 deletion app/router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EmberRouter from '@ember/routing/router';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
engines: {
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Model from '@ember-data/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import { Resource } from 'osf-api';
import OsfSerializer from './osf-serializer';

Expand Down
2 changes: 1 addition & 1 deletion app/services/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { waitFor } from '@ember/test-waiters';
import { restartableTask, waitForQueue } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import Cookies from 'ember-cookies/services/cookies';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Metrics from 'ember-metrics/services/metrics';
import Session from 'ember-simple-auth/services/session';
import Toast from 'ember-toastr/services/toast';
Expand Down
2 changes: 1 addition & 1 deletion app/services/current-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { computed } from '@ember/object';
import { alias } from '@ember/object/computed';
import Service, { inject as service } from '@ember/service';
import Cookies from 'ember-cookies/services/cookies';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Session from 'ember-simple-auth/services/session';
import RSVP from 'rsvp';

Expand Down
2 changes: 1 addition & 1 deletion app/services/meta-tags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Service, { inject as service } from '@ember/service';
import HeadTagsService from 'ember-cli-meta-tags/services/head-tags';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Intl from 'ember-intl/services/intl';
import pathJoin from 'ember-osf-web/utils/path-join';
import toArray from 'ember-osf-web/utils/to-array';
Expand Down
2 changes: 1 addition & 1 deletion app/services/status-messages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Service, { inject as service } from '@ember/service';
import Cookies from 'ember-cookies/services/cookies';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
OSF: {
Expand Down
2 changes: 1 addition & 1 deletion app/services/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { assert } from '@ember/debug';
import { computed } from '@ember/object';
import Service, { inject as service } from '@ember/service';
import { tracked } from '@glimmer/tracking';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Provider from 'ember-osf-web/models/provider';

const { defaultProvider, assetsPrefix } = config;
Expand Down
2 changes: 1 addition & 1 deletion app/session-stores/-application.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { task } from 'ember-concurrency';
import { waitFor } from '@ember/test-waiters';
import { taskFor } from 'ember-concurrency-ts';
import InstitutionModel from 'ember-osf-web/models/institution';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import IntlService from 'ember-intl/services/intl';
import captureException, { getApiErrorMessage } from 'ember-osf-web/utils/capture-exception';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Intl from 'ember-intl/services/intl';
import Toast from 'ember-toastr/services/toast';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { validatePresence } from 'ember-changeset-validations/validators';
import { BufferedChangeset } from 'ember-changeset/types';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Intl from 'ember-intl/services/intl';
import Toast from 'ember-toastr/services/toast';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Intl from 'ember-intl/services/intl';
import Toast from 'ember-toastr/services/toast';

Expand Down
2 changes: 1 addition & 1 deletion app/settings/account/-components/security/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { validateNumber, validatePresence } from 'ember-changeset-validations/va
import { BufferedChangeset } from 'ember-changeset/types';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Intl from 'ember-intl/services/intl';
import Toast from 'ember-toastr/services/toast';

Expand Down
2 changes: 1 addition & 1 deletion app/settings/profile/index/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import requireAuth from 'ember-osf-web/decorators/require-auth';

Expand Down
1 change: 0 additions & 1 deletion config/deprecation-workflow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
self.deprecationWorkflow = self.deprecationWorkflow || {};
self.deprecationWorkflow.config = {
workflow: [
{ handler: 'silence', matchId: 'this-property-fallback' },
{ handler: 'silence', matchId: 'routing.transition-methods' },
{ handler: 'silence', matchId: 'ember-utils.try-invoke' },
{ handler: 'silence', matchId: 'ember-simple-auth.initializer.setup-session-restoration' },
Expand Down
1 change: 1 addition & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env node */
// Note: environment.d.ts is now in app/config

function isTruthy(val) {
return ['true', '1'].includes(val.toString().toLowerCase());
Expand Down
2 changes: 1 addition & 1 deletion lib/analytics-page/addon/application/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task, TaskInstance } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import Node from 'ember-osf-web/models/node';
import AnalyticsService from 'ember-osf-web/services/analytics';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,26 @@
<div local-class='remove-spacer-container'></div>
</div>
{{/unless}}
<SortableGroup
@onChange={{action (perform this.reorderContributors)}}
@model={{this.contributors}}
<ol
{{sortable-group onChange=(action (perform this.reorderContributors)) }}
local-class='contributors-list'
as |group|
>
{{#each group.model as |modelItem|}}
{{#group.item model=modelItem as |item|}}
{{#each this.contributors as |modelItem|}}
<li {{sortable-item model=modelItem}}>
<ProjectContributors::List::Item
@group={{group}}
@group={{this.contributors}}
@contributor={{modelItem}}
@isAdmin={{this.isAdmin}}
@adminCount={{this.adminCount}}
@bibliographicCount={{this.bibliographicCount}}
@removeContributor={{action (perform this.removeContributor)}}
@toggleBibliographic={{action (perform this.toggleBibliographic)}}
@updatePermissions={{action (perform this.updatePermissions)}}
@item={{item}}
@item={{modelItem}}
/>
{{/group.item}}
</li>
{{/each}}
</SortableGroup>
</ol>
{{#if this.loadContributors.isRunning}}
<LoadingIndicator @dark={{true}} />
{{else if this.hasMore}}
Expand Down
2 changes: 1 addition & 1 deletion lib/collections/addon/application/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { action } from '@ember/object';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import CurrentUser from 'ember-osf-web/services/current-user';
import Theme from 'ember-osf-web/services/theme';
import pathJoin from 'ember-osf-web/utils/path-join';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { camelize } from '@ember/string';
import { waitFor } from '@ember/test-waiters';
import { keepLatestTask, timeout } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Media from 'ember-responsive';

import { layout } from 'ember-osf-web/decorators/component';
Expand Down
2 changes: 1 addition & 1 deletion lib/collections/addon/guid/edit/controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Controller from '@ember/controller';
import { action, computed } from '@ember/object';
import { alias } from '@ember/object/computed';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import CollectionSubmission from 'ember-osf-web/models/collection-submission';
import Collection from 'ember-osf-web/models/collection';
import CollectionProvider from 'ember-osf-web/models/collection-provider';
Expand Down
2 changes: 1 addition & 1 deletion lib/collections/addon/provider/moderation/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import Features from 'ember-feature-flags/services/features';
import Theme from 'ember-osf-web/services/theme';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
featureFlagNames: {
Expand Down
Loading

0 comments on commit 9ba7964

Please sign in to comment.