-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow well-defined import adjustments in native v2 packages
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// I'm doing this as a json import because even though that's not standard JS, | ||
// it's relaively easy to consume into builds for the web. As opposed to doing | ||
// something like fs.readFile, which is harder. | ||
// | ||
// @ts-ignore | ||
import mappings from 'ember-rfc176-data/mappings.json'; | ||
|
||
// these are packages that available to import in standard ember code that don't | ||
// exist as real packages. If a build system encounters them in stage 3, it | ||
// should convert them to runtime AMD require. | ||
// | ||
// Some of them (like @embroider/macros) won't ever be seen in stage 3, because | ||
// earlier plugins should take care of them. | ||
// | ||
// In embroider builds using ember-source >= 3.28, you won't see *any* of these | ||
// in stage3 because ember-source uses the standard rename-modules feature to | ||
// map them into real modules within ember-source. | ||
export const emberVirtualPackages = new Set<string>(mappings.map((m: any) => m.module)); | ||
|
||
// these are *real* packages that every ember addon is allow to resolve *as if | ||
// they were peerDepenedencies, because the host application promises to have | ||
// these packages. In principle, we could force every addon to declare these as | ||
// real peerDeps all the way down the dependency graph, but in practice that | ||
// makes the migration from v1 to v2 addons more painful than necessary, because | ||
// a v1 addon in between the app and a v2 addon might not declare the peerDep, | ||
// breaking the deeper v2 addon. | ||
export const emberVirtualPeerDeps = new Set<string>(['@glimmer/component']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters