Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-getowner-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-getowner-polyfill - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

CHANGELOG.md

1

config/environment.js

@@ -1,2 +0,1 @@

/* eslint-env node */
'use strict';

@@ -3,0 +2,0 @@

@@ -1,2 +0,1 @@

/* eslint-env node */
'use strict';

@@ -8,4 +7,4 @@

module.exports = {
name: 'ember-getowner-polyfill',
included: function() {
name: require('./package').name,
included() {
this._super.included.apply(this, arguments);

@@ -26,3 +25,3 @@

_ensureThisImport: function() {
_ensureThisImport() {
if (!this.import) {

@@ -29,0 +28,0 @@ this._findHost = function findHostShim() {

{
"name": "ember-getowner-polyfill",
"version": "2.2.0",
"version": "3.0.0",
"description": "The default blueprint for ember-cli addons.",

@@ -8,17 +8,28 @@ "keywords": [

],
"homepage": "https://github.com/rwjblue/ember-getowner-polyfill#readme",
"bugs": {
"url": "https://github.com/rwjblue/ember-getowner-polyfill/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rwjblue/ember-getowner-polyfill.git"
},
"license": "MIT",
"author": "Robert Jackson <me@rwjblue.com>",
"main": "index.js",
"directories": {
"test": "tests"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rwjblue/ember-getowner-polyfill.git"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-htmlbars": "^4.3.1",
"ember-cli-version-checker": "^2.1.0",

@@ -28,32 +39,43 @@ "ember-factory-for-polyfill": "^1.3.1"

"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.16.2",
"ember-cli-babel": "^6.6.0",
"ember-cli-content-security-policy": "0.5.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"babel-eslint": "^10.1.0",
"bower": "^1.8.8",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.3",
"ember-cli": "~3.18.0",
"ember-cli-babel": "^7.19.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-uglify": "^3.0.0",
"ember-debug-handlers-polyfill": "^1.0.3",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.16.0",
"loader.js": "^4.2.3"
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source-channel-url": "^2.0.1",
"ember-template-lint": "^2.6.0",
"ember-try": "^1.4.0",
"eslint": "^6.8.0",
"eslint-plugin-node": "^11.1.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0",
"release-it": "^13.5.7",
"release-it-lerna-changelog": "^2.3.0"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"node": "10.* || >= 12"
},
"homepage": "https://github.com/rwjblue/ember-getowner-polyfill#readme",
"bugs": {
"url": "https://github.com/rwjblue/ember-getowner-polyfill/issues"
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"main": "index.js",
"ember": {
"edition": "octane"
},
"ember-addon": {

@@ -63,3 +85,18 @@ "configPath": "tests/dummy/config",

"after": "ember-factory-for-polyfill"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
# ember-getowner-polyfill
This provides a polyfill for the `Ember.getOwner` feature added in Ember 2.3.
This provides a polyfill for the `Ember.getOwner` and `Ember.setOwner` features
added in Ember 2.3.

@@ -5,0 +6,0 @@ ## Installation

@@ -12,6 +12,11 @@ /* globals Ember, require */

var OWNER;
if (!_Ember.getOwner || !_Ember.setOwner) {
OWNER = '__' + (Date.now()) + '_owner';
}
if (!_Ember.getOwner) {
var CONTAINER = '__' + (Date.now()) + '_container';
var REGISTRY = '__' + (Date.now()) + '_registry';
var OWNER = '__' + (Date.now()) + '_owner';
var SAFE_LOOKUP_FACTORY_METHOD = '__' + (Date.now()) + '_lookupFactory';

@@ -157,15 +162,34 @@

function getOwner(object) {
if (object[OWNER]) {
return object[OWNER];
}
// Fallback to finding the owner on the container
var container = object.container;
if (!container) { return; }
if (!container[OWNER]) {
var owner = new FakeOwner(object);
container[OWNER] = owner;
}
return container[OWNER];
}
Object.defineProperty(_Ember, 'getOwner', {
get: function() {
return function(object) {
var container = object.container;
if (!container) { return; }
return getOwner;
}
});
}
if (!container[OWNER]) {
var owner = new FakeOwner(object);
container[OWNER] = owner;
}
if (!_Ember.setOwner) {
function setOwner(object, owner) {
object[OWNER] = owner;
}
return container[OWNER];
};
Object.defineProperty(_Ember, 'setOwner', {
get: function() {
return setOwner;
}

@@ -172,0 +196,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc