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

Sync stable->main #1723

Merged
merged 10 commits into from
Dec 13, 2023
71 changes: 42 additions & 29 deletions .release-plan.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"solution": {
"@embroider/addon-dev": {
"oldVersion": "4.1.2"
"impact": "patch",
"oldVersion": "4.1.2",
"newVersion": "4.1.3",
"constraints": [
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./packages/addon-dev/package.json"
},
"@embroider/addon-shim": {
"oldVersion": "1.8.7"
Expand All @@ -10,53 +19,57 @@
"oldVersion": "3.1.1"
},
"@embroider/compat": {
"impact": "minor",
"oldVersion": "3.3.1",
"newVersion": "3.4.0",
"impact": "patch",
"oldVersion": "3.4.0",
"newVersion": "3.4.1",
"constraints": [
{
"impact": "minor",
"reason": "Appears in changelog section :rocket: Enhancement"
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/macros"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "packages/compat/package.json"
"pkgJSONPath": "./packages/compat/package.json"
},
"@embroider/core": {
"oldVersion": "3.4.2"
"impact": "patch",
"oldVersion": "3.4.2",
"newVersion": "3.4.3",
"constraints": [
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/macros"
}
],
"pkgJSONPath": "./packages/core/package.json"
},
"@embroider/hbs-loader": {
"oldVersion": "3.0.3"
},
"@embroider/macros": {
"oldVersion": "1.13.3"
},
"@embroider/reverse-exports": {
"impact": "minor",
"oldVersion": "0.0.0",
"newVersion": "0.1.0",
"impact": "patch",
"oldVersion": "1.13.3",
"newVersion": "1.13.4",
"constraints": [
{
"impact": "minor",
"reason": "Appears in changelog section :rocket: Enhancement"
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
"reason": "Appears in changelog section :house: Internal"
}
],
"pkgJSONPath": "packages/reverse-exports/package.json"
"pkgJSONPath": "./packages/macros/package.json"
},
"@embroider/reverse-exports": {
"oldVersion": "0.1.0"
},
"@embroider/router": {
"impact": "patch",
"oldVersion": "2.1.5",
"newVersion": "2.1.6",
"constraints": [
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "packages/router/package.json"
"oldVersion": "2.1.6"
},
"@embroider/shared-internals": {
"oldVersion": "2.5.1"
Expand All @@ -74,5 +87,5 @@
"oldVersion": "3.2.1"
}
},
"description": "## Release (2023-11-28)\n\n@embroider/compat 3.4.0 (minor)\n@embroider/reverse-exports 0.1.0 (minor)\n@embroider/router 2.1.6 (patch)\n\n#### :rocket: Enhancement\n* `reverse-exports`\n * [#1652](https://github.com/embroider-build/embroider/pull/1652) create new @embroider/reverse-exports package ([@lolmaus](https://github.com/lolmaus))\n* `compat`\n * [#1673](https://github.com/embroider-build/embroider/pull/1673) allow apps to disable the decorator transforms ([@ef4](https://github.com/ef4))\n\n#### :bug: Bug Fix\n* `router`\n * [#1684](https://github.com/embroider-build/embroider/pull/1684) Workaround typescript regression in router package ([@ef4](https://github.com/ef4))\n* `reverse-exports`\n * [#1676](https://github.com/embroider-build/embroider/pull/1676) fix single asterisk replacement in reverse-exports ([@mansona](https://github.com/mansona))\n\n#### :house: Internal\n* [#1683](https://github.com/embroider-build/embroider/pull/1683) update the releasing CI job ([@mansona](https://github.com/mansona))\n* [#1681](https://github.com/embroider-build/embroider/pull/1681) skip watch-mode tests in windows ([@mansona](https://github.com/mansona))\n\n#### Committers: 3\n- Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus))\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Edward Faulkner ([@ef4](https://github.com/ef4))\n"
"description": "## Release (2023-12-13)\n\n@embroider/addon-dev 4.1.3 (patch)\n@embroider/compat 3.4.1 (patch)\n@embroider/core 3.4.3 (patch)\n@embroider/macros 1.13.4 (patch)\n\n#### :bug: Bug Fix\n* `@embroider/macros`\n * [#1688](https://github.com/embroider-build/embroider/pull/1688) Fix branch elimination for `macroDependencySatisfies` ([@mike-engel](https://github.com/mike-engel))\n* `@embroider/compat`\n * [#1706](https://github.com/embroider-build/embroider/pull/1706) Support engine's lazyLoading boolean config ([@fengb](https://github.com/fengb))\n* `@embroider/addon-dev`\n * [#1696](https://github.com/embroider-build/embroider/pull/1696) Use rollup's `addWatchFile` API to mark dependencies ([@chancancode](https://github.com/chancancode))\n\n#### :house: Internal\n* Other\n * [#1716](https://github.com/embroider-build/embroider/pull/1716) update release-plan ([@mansona](https://github.com/mansona))\n * [#1698](https://github.com/embroider-build/embroider/pull/1698) Use release plan ([@mansona](https://github.com/mansona))\n* `@embroider/macros`\n * [#1709](https://github.com/embroider-build/embroider/pull/1709) Jest types broke our CI ([@ef4](https://github.com/ef4))\n* `@embroider/test-scenarios`\n * [#1705](https://github.com/embroider-build/embroider/pull/1705) Backport #1703 to stable ([@chancancode](https://github.com/chancancode))\n\n#### Committers: 5\n- Benjamin Feng ([@fengb](https://github.com/fengb))\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Edward Faulkner ([@ef4](https://github.com/ef4))\n- Godfrey Chan ([@chancancode](https://github.com/chancancode))\n- Mike Engel ([@mike-engel](https://github.com/mike-engel))\n"
}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
# Embroider Changelog
## Release (2023-12-13)

@embroider/addon-dev 4.1.3 (patch)
@embroider/compat 3.4.1 (patch)
@embroider/core 3.4.3 (patch)
@embroider/macros 1.13.4 (patch)

#### :bug: Bug Fix
* `@embroider/macros`
* [#1688](https://github.com/embroider-build/embroider/pull/1688) Fix branch elimination for `macroDependencySatisfies` ([@mike-engel](https://github.com/mike-engel))
* `@embroider/compat`
* [#1706](https://github.com/embroider-build/embroider/pull/1706) Support engine's lazyLoading boolean config ([@fengb](https://github.com/fengb))
* `@embroider/addon-dev`
* [#1696](https://github.com/embroider-build/embroider/pull/1696) Use rollup's `addWatchFile` API to mark dependencies ([@chancancode](https://github.com/chancancode))

#### :house: Internal
* Other
* [#1716](https://github.com/embroider-build/embroider/pull/1716) update release-plan ([@mansona](https://github.com/mansona))
* [#1698](https://github.com/embroider-build/embroider/pull/1698) Use release plan ([@mansona](https://github.com/mansona))
* `@embroider/macros`
* [#1709](https://github.com/embroider-build/embroider/pull/1709) Jest types broke our CI ([@ef4](https://github.com/ef4))
* `@embroider/test-scenarios`
* [#1705](https://github.com/embroider-build/embroider/pull/1705) Backport #1703 to stable ([@chancancode](https://github.com/chancancode))

#### Committers: 5
- Benjamin Feng ([@fengb](https://github.com/fengb))
- Chris Manson ([@mansona](https://github.com/mansona))
- Edward Faulkner ([@ef4](https://github.com/ef4))
- Godfrey Chan ([@chancancode](https://github.com/chancancode))
- Mike Engel ([@mike-engel](https://github.com/mike-engel))

## Release (2023-11-28)

Expand Down
2 changes: 1 addition & 1 deletion packages/addon-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/addon-dev",
"version": "4.1.2",
"version": "4.1.3",
"description": "Utilities for addon authors",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/compat",
"version": "3.4.0",
"version": "3.4.1",
"private": false,
"description": "Backward compatibility layer for the Embroider build system.",
"repository": {
Expand Down
13 changes: 9 additions & 4 deletions packages/compat/src/compat-adapters/ember-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,16 @@ export default class extends V1Addon {
meta['implicit-modules'] = [];
}
meta['implicit-modules'].push('./ember/index.js');

if (!meta['implicit-test-modules']) {
meta['implicit-test-modules'] = [];
// before 5.6, Ember uses the AMD loader to decide if it's test-only parts
// are present, so we must ensure they're registered. After that it's
// enough to evaluate ember-testing, which @embroider/core is hard-coded
// to do in the backward-compatible tests bundle.
if (!satisfies(this.packageJSON.version, '>= 5.6.0-alpha.0', { includePrerelease: true })) {
if (!meta['implicit-test-modules']) {
meta['implicit-test-modules'] = [];
}
meta['implicit-test-modules'].push('./ember-testing/index.js');
}
meta['implicit-test-modules'].push('./ember-testing/index.js');
}
return meta;
}
Expand Down
1 change: 1 addition & 0 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,7 @@ export class CompatAppBuilder {
// packagers to understand. It's better to express it here as a direct
// module dependency.
let eagerModules: string[] = [
'ember-testing',
explicitRelative(dirname(myName), this.topAppJSAsset(appFiles, prepared).relativePath),
];

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/core",
"version": "3.4.2",
"version": "3.4.3",
"private": false,
"description": "A build system for EmberJS applications.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/macros/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/macros",
"version": "1.13.3",
"version": "1.13.4",
"private": false,
"description": "Standardized build-time macros for ember apps.",
"keywords": [
Expand Down
13 changes: 11 additions & 2 deletions packages/macros/src/glimmer/ast-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function makeFirstTransform(opts: FirstTransformParams) {
}
},
},
SubExpression(node: any) {
SubExpression(node: any, walker: { parent: { node: any } }) {
if (node.path.type !== 'PathExpression') {
return;
}
Expand All @@ -97,7 +97,16 @@ export function makeFirstTransform(opts: FirstTransformParams) {
);
}
if (node.path.original === 'macroDependencySatisfies') {
return literal(dependencySatisfies(node, opts.packageRoot, moduleName, packageCache), env.syntax.builders);
const staticValue = literal(
dependencySatisfies(node, opts.packageRoot, moduleName, packageCache),
env.syntax.builders
);
// If this is a macro expression by itself, then turn it into a macroCondition for the second pass to prune.
// Otherwise assume it's being composed with another macro and evaluate it as a literal
if (walker.parent.node.path.original === 'if') {
return env.syntax.builders.sexpr('macroCondition', [staticValue]);
}
return staticValue;
}
},
MustacheStatement(node: any) {
Expand Down
5 changes: 5 additions & 0 deletions packages/macros/tests/glimmer/dependency-satisfies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ describe('dependency satisfies', () => {
expect(result).toMatch(/@a=\{\{true\}\}/);
});

test('in branch', () => {
let result = transform(`{{#if (macroDependencySatisfies 'qunit' '^2.8.0')}}red{{else}}blue{{/if}}`, { filename });
expect(result).toEqual('red');
});

test('emits false for out-of-range package', () => {
let result = transform(`{{macroDependencySatisfies 'qunit' '^10.0.0'}}`, { filename });
expect(result).toEqual('{{false}}');
Expand Down
Loading