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

allow REUSE_WORKSPACE with in repo addons #618

Merged
merged 3 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/compat/src/prebuilt-addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RehomedPackageCache extends PackageCache {
constructor(private appSrcDir: string, private appDestDir: string) {
super();
}
protected basedir(pkg: Package): string {
basedir(pkg: Package): string {
if (pkg.root === this.appSrcDir) {
return this.appDestDir;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/package-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class PackageCache {
protected rootCache: Map<string, Package> = new Map();
protected resolutionCache: Map<Package, Map<string, Package | null>> = new Map();

protected basedir(pkg: Package): string {
basedir(pkg: Package): string {
return pkg.root;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class Package {
// stop you.
let pkg;
try {
pkg = this.packageCache.get(join(this.root, path));
pkg = this.packageCache.get(join(this.packageCache.basedir(this), path));
} catch (err) {
// package was missing or had invalid package.json
return false;
Expand All @@ -153,7 +153,7 @@ export default class Package {
main = `${main}.js`;
}

let mainPath = join(this.root, path, main);
let mainPath = join(this.packageCache.basedir(this), path, main);
if (!existsSync(mainPath)) {
// package has no valid main
return false;
Expand Down
2 changes: 1 addition & 1 deletion packages/util/addon/ember-private-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function lookupCurriedComponentDefinition(name, owner) {
}

function contextForLookup(owner) {
if (macroCondition(dependencySatisfies('ember-source', '>=3.24.0-canary'))) {
if (macroCondition(dependencySatisfies('ember-source', '>=3.24.0-canary || >=3.24.0-beta'))) {
return owner;
} else {
return { owner };
Expand Down