Skip to content

Commit

Permalink
Merge pull request #1246 from embroider-build/drop-unuspported-embers
Browse files Browse the repository at this point in the history
Dropping support for older ember's
  • Loading branch information
ef4 authored Oct 27, 2022
2 parents bae39b7 + 6d0b345 commit c276a0d
Show file tree
Hide file tree
Showing 143 changed files with 4,348 additions and 5,627 deletions.
26 changes: 26 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Setup node and yarn
description: Setup node and install dependencies using yarn
inputs:
use_lockfile:
description: 'Whether to use the lockfile vs latest floating dependencies'
required: false
default: true
runs:
using: 'composite'
steps:
- uses: volta-cli/action@v3
env:
ACTIONS_STEP_DEBUG: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v1
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
shell: bash
32 changes: 4 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v3
env:
ACTIONS_STEP_DEBUG: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v1
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- uses: ./.github/actions/setup
- name: lint
run: yarn lint
- id: set-matrix
working-directory: test-packages/support
run: echo "::set-output name=matrix::$(node ./suite-setup-util.js --matrix)"
run: echo "matrix=$(node ./suite-setup-util.js --matrix)" >> $GITHUB_OUTPUT

test:
needs: ['preflight']
Expand All @@ -58,20 +45,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v3
env:
ACTIONS_STEP_DEBUG: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
- uses: ./.github/actions/setup
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v1
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --no-lockfile
use_lockfile: false
- name: suite
run: ${{ matrix.command }}
working-directory: ${{ matrix.dir }}
4 changes: 4 additions & 0 deletions packages/addon-shim/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"@types/resolve": "^1.20.0",
"@types/semver": "^7.3.6",
"@types/strip-bom": "^4.0.1",
"broccoli-stew": "^3.0.0",
"ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-engines": "^0.8.19",
"scenario-tester": "^2.0.1",
"typescript": "*"
},
"peerDependencies": {
Expand Down
8 changes: 0 additions & 8 deletions packages/compat/src/compat-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import { tmpdir } from '@embroider/shared-internals';
import { Options as AdjustImportsOptions } from '@embroider/core/src/babel-plugin-adjust-imports';
import { getEmberExports } from '@embroider/core/src/load-ember-template-compiler';

import semver from 'semver';

interface TreeNames {
appJS: BroccoliNode;
htmlTree: BroccoliNode;
Expand Down Expand Up @@ -360,11 +358,6 @@ class CompatAppAdapter implements AppAdapter<TreeNames> {
activeAddons[addon.name] = addon.root;
}

let emberSource = this.activeAddonChildren().find(a => a.name === 'ember-source')!;
let emberNeedsModulesPolyfill = semver.satisfies(emberSource.version, '<3.27.0-beta.0', {
includePrerelease: true,
});

return {
activeAddons,
renameModules,
Expand All @@ -380,7 +373,6 @@ class CompatAppAdapter implements AppAdapter<TreeNames> {
// up as a side-effect of babel transpilation, and babel is subject to
// persistent caching.
externalsDir: join(tmpdir, 'embroider', 'externals'),
emberNeedsModulesPolyfill,
appRoot: this.root,
};
}
Expand Down
3 changes: 2 additions & 1 deletion packages/compat/src/moved-package-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { ensureSymlinkSync, readdirSync, realpathSync, lstatSync } from 'fs-extr
import { Memoize } from 'typescript-memoize';
import { PackageCache, Package, getOrCreate } from '@embroider/core';
import { MacrosConfig } from '@embroider/macros/src/node';
import os from 'os';

function assertNoTildeExpansion(source: string, target: string) {
if (target.includes('~')) {
if (target.includes('~') && os.platform() !== 'win32') {
throw new Error(
`The symbolic link: ${source}'s target: ${target} contained a bash expansion '~' which is not supported.`
);
Expand Down
105 changes: 0 additions & 105 deletions packages/compat/tests/addon-styles.test.ts

This file was deleted.

66 changes: 0 additions & 66 deletions packages/compat/tests/app-import.test.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/compat/tests/audit.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { emberTemplateCompilerPath, Project } from '@embroider/test-support';
import { emberTemplateCompilerPath } from '@embroider/test-support';
import { Project } from 'scenario-tester';
import { AppMeta, NodeTemplateCompilerParams, throwOnWarnings } from '@embroider/core';
import merge from 'lodash/merge';
import fromPairs from 'lodash/fromPairs';
Expand All @@ -15,7 +16,7 @@ describe('audit', function () {
let app: Project;

async function audit() {
app.writeSync();
await app.write();
let audit = new Audit(app.baseDir);
return await audit.run();
}
Expand Down Expand Up @@ -48,7 +49,6 @@ describe('audit', function () {
activeAddons: {},
relocatedFiles: {},
resolvableExtensions,
emberNeedsModulesPolyfill: true,
appRoot: '.',
},
}),
Expand Down
Loading

0 comments on commit c276a0d

Please sign in to comment.