DEV: Refactor bowerDependencies patch (#24437)
Moves the patch from ember-source to ember-cli so that it's easier for us to feature-flag an ember-source upgrade without fighting with patch-package. We'll be able to remove this patch once we're fully on Ember 5.x. (ref https://github.com/discourse/discourse/pull/21720)
This commit is contained in:
parent
0a58564ddd
commit
5276afa9b2
|
@ -0,0 +1,16 @@
|
|||
diff --git a/node_modules/ember-cli/lib/models/project.js b/node_modules/ember-cli/lib/models/project.js
|
||||
index 7b3c7c9..e0c5fb9 100644
|
||||
--- a/node_modules/ember-cli/lib/models/project.js
|
||||
+++ b/node_modules/ember-cli/lib/models/project.js
|
||||
@@ -716,6 +716,11 @@ class Project {
|
||||
logger.info('getProjectRoot %s -> %s', process.cwd(), directory);
|
||||
return directory;
|
||||
}
|
||||
+
|
||||
+ // Allows us to use recent ember-cli with ember-source 3.28.12
|
||||
+ bowerDependencies(){
|
||||
+ return [];
|
||||
+ }
|
||||
}
|
||||
|
||||
class NotFoundError extends Error {
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/node_modules/ember-source/lib/index.js b/node_modules/ember-source/lib/index.js
|
||||
index ce887fbeb..8caf078c5 100644
|
||||
--- a/node_modules/ember-source/lib/index.js
|
||||
+++ b/node_modules/ember-source/lib/index.js
|
||||
@@ -45,13 +45,6 @@ module.exports = {
|
||||
init() {
|
||||
this._super.init && this._super.init.apply(this, arguments);
|
||||
|
||||
- if ('ember' in this.project.bowerDependencies()) {
|
||||
- // TODO: move this to a throw soon.
|
||||
- this.ui.writeWarnLine(
|
||||
- 'Ember.js is now provided by node_module `ember-source`, please remove it from bower'
|
||||
- );
|
||||
- }
|
||||
-
|
||||
// resets `this.root` to the correct location by default ember-cli
|
||||
// considers `__dirname` here to be the root, but since our main entry
|
||||
// point is within a subfolder we need to correct that
|
Loading…
Reference in New Issue