Skip to content

Commit

Permalink
update type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Jan 4, 2024
1 parent 042a9a8 commit 4b3b530
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"broccoli-node-api": "^1.7.0",
"code-equality-assertions": "^0.9.0",
"ember-engines": "^0.8.19",
"scenario-tester": "^3.0.0",
"scenario-tester": "^3.0.1",
"typescript": "^5.1.6"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/macros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/semver": "^7.3.6",
"babel-plugin-ember-template-compilation": "^2.1.1",
"code-equality-assertions": "^0.9.0",
"scenario-tester": "^3.0.0",
"scenario-tester": "^3.0.1",
"typescript": "^5.1.6"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/macros/tests/babel/dependency-satisfies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe(`dependencySatisfies`, function () {
allBabelVersions({
includePresetsTests: true,
babelConfig() {
project.writeSync();
project.write();
let config = MacrosConfig.for({}, project.baseDir);
config.finalize();
return {
Expand Down Expand Up @@ -141,7 +141,7 @@ describe(`dependencySatisfies`, function () {
import { dependencySatisfies } from '@embroider/macros';
export default function() {
return {
return {
// specified in dependencies
util: dependencySatisfies('@embroider/util', '*'),
Expand Down
2 changes: 1 addition & 1 deletion packages/macros/tests/babel/macro-condition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('macroCondition', function () {
beforeAll(() => {
project = new Project('test-app');
project.addDependency('qunit', '2.0.0');
project.writeSync();
project.write();
filename = join(project.baseDir, 'sample.js');
});

Expand Down
4 changes: 2 additions & 2 deletions packages/macros/tests/glimmer/dependency-satisfies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ describe('dependency satisfies', () => {
let project: Project;
let filename: string;

beforeAll(() => {
beforeAll(async () => {
project = new Project('app');
project.addDependency('qunit', '2.9.1');
project.addDependency('foo', '1.1.0-beta.1');
project.writeSync();
await project.write();
filename = join(project.baseDir, 'sample.js');
});

Expand Down
8 changes: 4 additions & 4 deletions packages/macros/tests/glimmer/macro-condition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ describe(`macroCondition`, function () {
expect(code).toMatch(/\{\{my-assertion undefined\}\}/);
});

test('macroCondition composes with other macros, true case', function () {
test('macroCondition composes with other macros, true case', async function () {
project = new Project('app');
project.addDependency('ember-source', '3.1.2');
project.writeSync();
await project.write();
let code = transform(
`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '3.x')) 'red' 'blue') }}`,
{ filename: join(project.baseDir, 'sample.js') }
);
expect(code).toMatch(/\{\{my-assertion ["']red["']\}\}/);
});

test('macroCondition composes with other macros, false case', function () {
test('macroCondition composes with other macros, false case', async function () {
project = new Project('app');
project.addDependency('ember-source', '3.1.2');
project.writeSync();
await project.write();
let code = transform(
`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '10.x')) 'red' 'blue') }}`,
{ filename: join(project.baseDir, 'sample.js') }
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

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

Loading

0 comments on commit 4b3b530

Please sign in to comment.