Skip to content

Commit

Permalink
Merge pull request #13 from adopted-ember-addons/fix-ember-error
Browse files Browse the repository at this point in the history
Fixes for Ember 5.x
  • Loading branch information
halfbyte authored Jul 4, 2023
2 parents c53eb1b + 02fdc61 commit 1ea244e
Show file tree
Hide file tree
Showing 6 changed files with 480 additions and 58 deletions.
6 changes: 4 additions & 2 deletions addon/providers/google-oauth2-bearer-v2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable ember/avoid-leaking-state-in-ember-objects, ember/no-get */
import { Promise as EmberPromise } from 'rsvp';
import { run } from '@ember/runloop';
import { assign } from '@ember/polyfills';
import OAuth2Code from 'torii/providers/oauth2-code';
import { configurable } from 'torii/configuration';

Expand Down Expand Up @@ -102,7 +101,10 @@ var GoogleOauth2BearerV2 = OAuth2Code.extend({
// authentication data and resolve
run(() =>
resolve(
assign(authData, { provider: name, redirectUri: redirectUri })
Object.assign(authData, {
provider: name,
redirectUri: redirectUri,
})
)
);
} else if (jsonResponse.audience === undefined) {
Expand Down
3 changes: 1 addition & 2 deletions addon/redirect-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
import { Promise as EmberPromise } from 'rsvp';

import EmberObject from '@ember/object';
import EmberError from '@ember/error';

import { CURRENT_REQUEST_KEY, WARNING_KEY } from './mixins/ui-service-mixin';
import configuration from 'torii/configuration';

export class ToriiRedirectError extends EmberError {
export class ToriiRedirectError extends Error {
constructor() {
super(...arguments);
this.name = 'ToriiRedirectError';
Expand Down
1 change: 1 addition & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = async function () {
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
'ember-source': '~3.28.0',
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.0.4",
Expand All @@ -66,13 +67,12 @@
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^6.2.2",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-source": "~4.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
Expand Down Expand Up @@ -117,4 +117,4 @@
"tokenRef": "GITHUB_AUTH"
}
}
}
}
3 changes: 0 additions & 3 deletions tests/integration/session-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ module('Integration | Session (open)', function (hooks) {
this.owner.register('service:session', SessionService);
this.owner.register('torii-provider:dummy-success', DummySuccessProvider);
this.owner.register('torii-provider:dummy-failure', DummyFailureProvider);
this.owner.inject('service:session', 'torii', 'service:torii');

session = this.owner.lookup('service:session');
});

Expand Down Expand Up @@ -76,7 +74,6 @@ module('Integration | Session (close) ', function (hooks) {

hooks.beforeEach(function () {
this.owner.register('service:session', SessionService);
this.owner.inject('service:session', 'torii', 'service:torii');
session = this.owner.lookup('service:session');
adapter = this.owner.lookup('torii-adapter:application');

Expand Down
Loading

0 comments on commit 1ea244e

Please sign in to comment.