Skip to content

Commit

Permalink
Merge pull request #635 from simonihmig/fix-main
Browse files Browse the repository at this point in the history
Fix CI for new Ember v6 canary and volta v2 releases
  • Loading branch information
simonihmig authored Sep 10, 2024
2 parents b423901 + f82d7b7 commit a17db00
Show file tree
Hide file tree
Showing 27 changed files with 43 additions and 41 deletions.
5 changes: 1 addition & 4 deletions packages/addon-template/tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ module.exports = function (environment) {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
EXTEND_PROTOTYPES: false,
},

APP: {
Expand Down
5 changes: 1 addition & 4 deletions packages/app-template/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ module.exports = function (environment) {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
EXTEND_PROTOTYPES: false,
},

APP: {
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/addon-dev-dep-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ addonScenarios
app = await scenario.prepare();
});
test('ensure build error', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.notEqual(result.exitCode, 0, result.output);
assert.ok(
/@ef4\/addon-template tried to import \"some-lib\" in \"@ef4\/addon-template\/index.js\" from addon code, but \"some-lib\" is a devDependency/.test(
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/babel-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ appScenarios
app = await scenario.prepare();
});
test('yarn test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/common-chunk-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/conflict-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ appScenarios
app = await scenario.prepare();
});
test('ensure build error', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.notEqual(result.exitCode, 0, result.output);
assert.ok(
/@ef4\/app-template needs inner-lib satisfying \^1.0.0, but we have version 2.3.4 because of @ef4\/addon-template/.test(
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/csp-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ appScenarios
app = await scenario.prepare();
});
test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/custom-html-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/customized-vendor-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ appScenarios
app = await scenario.prepare();
});
test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/doubly-indirect-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/dynamic-import-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});

Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/ember-cli-typescript-2-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ appScenarios
app = await scenario.prepare();
});
test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/ember-cli-typescript-3-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ appScenarios
app = await scenario.prepare();
});
test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/ember-cli-typescript-4-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ appScenarios
app = await scenario.prepare();
});
test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/fastboot-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import resolve from 'resolve';
import { realpathSync } from 'fs';

export async function setupFastboot(app: PreparedApp, environment = 'development') {
let result = await app.execute(`volta run ember -- build --environment=${environment}`);
let result = await app.execute(`volta run ember build --environment=${environment}`);
if (result.exitCode !== 0) {
throw new Error(`failed to build app for fastboot: ${result.output}`);
}
Expand Down
7 changes: 4 additions & 3 deletions test-scenarios/import-sync-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ appScenarios
return { message: err.message }
}
},
});`
});`,
},
},
tests: {
acceptance: {
'import-sync-test.js': `
'import-sync-test.js':
`
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
Expand Down Expand Up @@ -146,7 +147,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});

Expand Down
4 changes: 2 additions & 2 deletions test-scenarios/indirect-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});

Expand Down Expand Up @@ -248,7 +248,7 @@ Scenarios.fromProject(baseApp)
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/layering-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ appScenarios
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
6 changes: 3 additions & 3 deletions test-scenarios/leader-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('run tests', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand All @@ -98,7 +98,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('ensure error', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.notEqual(result.exitCode, 0, result.output);
assert.ok(
/To use these addons, your app needs ember-auto-import >= 2: .*other-problematic-addon.*problematic-addon/.test(
Expand Down Expand Up @@ -128,7 +128,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('ensure error', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.notEqual(result.exitCode, 0, result.output);
assert.ok(
/To use these addons, your app needs ember-auto-import >= 2: .*other-problematic-addon.*problematic-addon/.test(
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/merged-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ appScenarios
app = await scenario.prepare();
});
test('ensure build succeeds', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/no-conflict-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ appScenarios
app = await scenario.prepare();
});
test('ensure build succeeds', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/node-es-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ template
});
test('npm run test', async function (assert) {
console.log(app.dir);
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/sample-addon-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ addonScenarios
app = await scenario.prepare();
});
test('yarn test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
11 changes: 9 additions & 2 deletions test-scenarios/static-import-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ function staticImportTest(project: Project) {
}),
});
`,
'hello-world.hbs': `
<div class="hello-world">{{this.formattedDate}}</div>
<div class="lodash">{{#if this.lodashPresent}}yes{{else}}no{{/if}}</div>
<div class="aliased">{{this.aliasedResult}}</div>
<div class="scoped">{{this.fromScoped}}</div>
`,
},
lib: {
'example1.js': 'export default function() { return "example1 worked" }',
Expand Down Expand Up @@ -151,6 +157,7 @@ function staticImportTest(project: Project) {
templates: {
'application.hbs': `{{hello-world}}`,
components: {
// Our "lts" scenario runs a very old version of Ember that does not support colocated components, that's why we intentionally keep this here
'hello-world.hbs': `
<div class="hello-world">{{this.formattedDate}}</div>
<div class="lodash">{{#if this.lodashPresent}}yes{{else}}no{{/if}}</div>
Expand Down Expand Up @@ -216,7 +223,7 @@ function staticImportTest(project: Project) {
let txt = await loadTxt();
assert.equal(txt, 'here is some text');
});
});
});
`,
'import-into-tests-test.js': `
import { module, test } from 'qunit';
Expand Down Expand Up @@ -397,7 +404,7 @@ scenarios.forEachScenario(scenario => {
});

test('npm run test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/targets-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ appScenarios
app = await scenario.prepare();
});
test('yarn test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
6 changes: 3 additions & 3 deletions test-scenarios/v2-addon-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ scenarios.forEachScenario(scenario => {
app = await scenario.prepare();
});
test('yarn test', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down Expand Up @@ -454,7 +454,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('ensure error', async function (assert) {
let result = await app.execute('volta run npm -- run build');
let result = await app.execute('volta run npm run build');
assert.notEqual(result.exitCode, 0, result.output);
assert.ok(
/my-v1-addon needs to depend on ember-auto-import in order to use my-v2-addon/.test(result.stderr),
Expand Down Expand Up @@ -528,7 +528,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('ensure success', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.strictEqual(result.exitCode, 0, result.output);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test-scenarios/webpack-config-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Scenarios.fromProject(baseApp)
app = await scenario.prepare();
});
test('ensure build succeeds', async function (assert) {
let result = await app.execute('volta run npm -- run test');
let result = await app.execute('volta run npm run test');
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down

0 comments on commit a17db00

Please sign in to comment.