Skip to content

Commit

Permalink
Support only 4.12 (LTS) or higher, delete a bunch of code, remove mac…
Browse files Browse the repository at this point in the history
…ros, etc
  • Loading branch information
NullVoxPopuli committed Jun 7, 2024
1 parent 9d1a025 commit 7497979
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 61 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ jobs:
fail-fast: false
matrix:
ember-try-scenario:
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
Expand Down
21 changes: 2 additions & 19 deletions addon/addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,8 @@ import EmberObject from '@ember/object';
import { dasherize, classify, underscore } from './string';
import { DEBUG } from '@glimmer/env';
import classFactory from './utils/class-factory';
import {
macroCondition,
dependencySatisfies,
importSync,
} from '@embroider/macros';

let getOwner;

if (macroCondition(dependencySatisfies('ember-source', '>= 4.11'))) {
getOwner = importSync('@ember/owner').getOwner;
} else {
getOwner = importSync('@ember/application').getOwner;
}

import { TEMPLATES } from './template-cache';
import { getOwner } from '@ember/owner';

if (typeof requirejs.entries === 'undefined') {
requirejs.entries = requirejs._eak_seen;
Expand Down Expand Up @@ -307,11 +294,7 @@ class Resolver extends EmberObject {
}

resolveTemplate(parsedName) {
let resolved = this.resolveOther(parsedName);
if (resolved == null) {
resolved = TEMPLATES[parsedName.fullNameWithoutType];
}
return resolved;
return this.resolveOther(parsedName);
}

mainModuleName(parsedName) {
Expand Down
8 changes: 0 additions & 8 deletions addon/addon/template-cache.js

This file was deleted.

1 change: 0 additions & 1 deletion addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"scripts": {},
"dependencies": {
"@embroider/macros": "^1.16.2",
"ember-cli-babel": "^7.26.11"
},
"peerDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions test-app/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,6 @@ module.exports = async function () {
},

scenarios: [
{
name: 'ember-lts-4.4',
npm: {
devDependencies: {
'ember-source': '~4.4.0',
},
},
},
{
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-lts-4.12',
npm: {
Expand Down
13 changes: 1 addition & 12 deletions test-app/tests/unit/resolvers/classic/-setup-resolver.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import Resolver, { ModuleRegistry } from 'ember-resolver';
import {
macroCondition,
dependencySatisfies,
importSync,
} from '@embroider/macros';

let setOwner;

if (macroCondition(dependencySatisfies('ember-source', '>= 4.11'))) {
setOwner = importSync('@ember/owner').setOwner;
} else {
setOwner = importSync('@ember/application').setOwner;
}
import { setOwner } from '@ember/owner';

export let resolver;
export let loader;
Expand Down

0 comments on commit 7497979

Please sign in to comment.