-
Notifications
You must be signed in to change notification settings - Fork 137
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
Ensure style compilation works properly with ember-cli >= 3.18 #934
Changes from all commits
d6cb7a7
13b587d
61fb016
a04ee3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ import mapKeys from 'lodash/mapKeys'; | |
import SynthesizeTemplateOnlyComponents from './synthesize-template-only-components'; | ||
import { isEmberAutoImportDynamic } from './detect-babel-plugins'; | ||
import prepHtmlbarsAstPluginsForUnwrap from './prepare-htmlbars-ast-plugins'; | ||
import { readFileSync } from 'fs'; | ||
import semver from 'semver'; | ||
|
||
// This controls and types the interface between our new world and the classic | ||
// v1 app instance. | ||
|
@@ -97,6 +99,11 @@ export default class V1App { | |
return dirname(emberCLIPackage); | ||
} | ||
|
||
@Memoize() | ||
get hasCompiledStyles() { | ||
return semver.gte(JSON.parse(readFileSync(`${this.emberCLILocation}/package.json`, 'utf8')).version, '3.18.0'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rwjblue I'm open to suggestions to detecting this in a different way... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ya this seems good to me, especially since we already have the |
||
} | ||
|
||
private requireFromEmberCLI(specifier: string) { | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports | ||
return require(resolve.sync(specifier, { basedir: this.emberCLILocation })); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"broccoli": "^3.4.2", | ||
"console-ui": "^3.0.0", | ||
"ember-auto-import": "^1.2.21", | ||
"ember-cli": "~3.17.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once this is green, I would like to test bumping this to latest. I have chosen the most conservative bump to minimize variables as I resolve the issue at hand. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've bumped to latest and everything remains green |
||
"ember-cli": "~3.27.0", | ||
"ember-cli-babel": "^7.20.5", | ||
"ember-cli-htmlbars": "^4.2.0", | ||
"ember-resolver": "^7.0.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather then detected this for each add-on, i memoize the result on the app instance and reuse said result for each addon's addon styles