Skip to content

Commit

Permalink
feat: remove unusued base64 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Nov 19, 2022
1 parent c6b821f commit dc0c8d1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
26 changes: 0 additions & 26 deletions packages/ember-simple-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@ module.exports = {

included() {
this._super.included.apply(this, arguments);
this._ensureThisImport();

const app = this._findHost();
const config = app.options['ember-simple-auth'] || {};
this.addonConfig = config;

this.import('vendor/base64.js');
},

treeForVendor() {
return new Funnel(path.dirname(require.resolve('base-64')), {
files: ['base64.js']
});
},

treeForAddon(tree) {
Expand All @@ -45,23 +36,6 @@ module.exports = {
}

return this._super.treeForApp.apply(this, arguments);
},

_ensureThisImport: function() {
if (!this.import) {
this._findHost = function findHostShim() {
var current = this;
var app;
do {
app = current.app || app;
} while (current.parent.parent && (current = current.parent));
return app;
};
this.import = function importShim(asset, options) {
var app = this._findHost();
app.import(asset, options);
};
}
}
};

1 change: 0 additions & 1 deletion packages/ember-simple-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"test:node": "mocha node-tests --recursive"
},
"dependencies": {
"base-64": "^1.0.0",
"broccoli-file-creator": "^2.1.1",
"broccoli-funnel": "^3.0.0",
"broccoli-merge-trees": "^4.0.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3283,11 +3283,6 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==

base-64@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/base-64/-/base-64-1.0.0.tgz#09d0f2084e32a3fd08c2475b973788eee6ae8f4a"
integrity sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==

base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
Expand Down

0 comments on commit dc0c8d1

Please sign in to comment.