Skip to content

Commit

Permalink
Merge pull request #2321 from brunoocasali/remove-esa-version
Browse files Browse the repository at this point in the history
Remove ESA version from ember inspector
  • Loading branch information
BobrImperator authored Sep 24, 2021
2 parents 41a7134 + 15690d7 commit d9cac59
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 333 deletions.
2 changes: 0 additions & 2 deletions packages/classic-test-app/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ module.exports = function(environment) {
fastboot: {
hostWhitelist: [/^localhost:\d+$/]
},

esaVersion: require('../../../package.json').version,
};

if (environment === 'development') {
Expand Down
17 changes: 3 additions & 14 deletions packages/ember-simple-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,26 @@
/* eslint-env node */
/* eslint-disable no-var, object-shorthand, prefer-template */

var writeFile = require('broccoli-file-creator');
var version = require('./package.json').version;
var path = require('path');
var Funnel = require('broccoli-funnel');
var MergeTrees = require('broccoli-merge-trees');

module.exports = {
name: 'ember-simple-auth',

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

this.import('vendor/ember-simple-auth/register-version.js');
this.import('vendor/base64.js');
},

treeForVendor() {
var content = "Ember.libraries.register('Ember Simple Auth', '" + version + "');";
var registerVersionTree = writeFile(
'ember-simple-auth/register-version.js',
content
);
var base64Tree = new Funnel(path.dirname(require.resolve('base-64')), {
return new Funnel(path.dirname(require.resolve('base-64')), {
files: ['base64.js']
});

return MergeTrees([registerVersionTree, base64Tree]);
},

_ensureThisImport: function() {
_ensureThisImport() {
if (!this.import) {
this._findHost = function findHostShim() {
var current = this;
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-simple-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
},
"dependencies": {
"base-64": "^0.1.0",
"broccoli-file-creator": "^2.0.0",
"broccoli-funnel": "^1.2.0 || ^2.0.0",
"broccoli-merge-trees": "^2.0.0 || ^3.0.0",
"ember-cli-babel": "^7.20.5",
"ember-cli-is-package-missing": "^1.0.0",
"ember-cookies": "^0.5.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-simple-auth/tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ module.exports = function(environment) {
// Here you can pass flags/options to your application instance
// when it is created
},

esaVersion: require('../../../package.json').version
};

if (environment === 'development') {
Expand Down
18 changes: 0 additions & 18 deletions packages/ember-simple-auth/tests/unit/register-version-test.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/test-app/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ module.exports = function(environment) {
fastboot: {
hostWhitelist: [/^localhost:\d+$/]
},

esaVersion: require('../../../package.json').version,
};

if (environment === 'development') {
Expand Down
Loading

0 comments on commit d9cac59

Please sign in to comment.