Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember: Remove global Ember usage #17843

Merged
merged 5 commits into from Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/ember/package.json
Expand Up @@ -56,9 +56,10 @@
},
"peerDependencies": {
"@babel/core": "*",
"@types/ember__component": "4.0.8",
"babel-plugin-ember-modules-api-polyfill": "^2.12.0",
"babel-plugin-htmlbars-inline-precompile": "2 || 3",
"ember-source": "^3.16.0"
"ember-source": "~3.28.1"
},
"engines": {
"node": ">=10.13.0"
Expand Down
5 changes: 2 additions & 3 deletions app/ember/src/client/preview/render.ts
Expand Up @@ -2,11 +2,10 @@ import global from 'global';
import dedent from 'ts-dedent';
import { RenderContext } from '@storybook/store';
import { OptionsArgs, EmberFramework } from './types';
import Component from '@ember/component';

const { window: globalWindow, document } = global;

declare let Ember: any;

const rootEl = document.getElementById('root');

const config = globalWindow.require(`${globalWindow.STORYBOOK_NAME}/config/environment`);
Expand Down Expand Up @@ -38,7 +37,7 @@ function render(options: OptionsArgs, el: HTMLElement) {
.then((instance: any) => {
instance.register(
'component:story-mode',
Ember.Component.extend({
Component.extend({
layout: template || options,
...context,
})
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Expand Up @@ -7863,9 +7863,10 @@ __metadata:
ts-dedent: ^2.0.0
peerDependencies:
"@babel/core": "*"
"@types/ember__component": 4.0.8
babel-plugin-ember-modules-api-polyfill: ^2.12.0
babel-plugin-htmlbars-inline-precompile: 2 || 3
ember-source: ^3.16.0
ember-source: ~3.28.1
bin:
build-storybook: ./bin/build.js
start-storybook: ./bin/index.js
Expand Down