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

Release prep #1406

Merged
merged 3 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/.recoverignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change from: 137fcab566174aad3ebb67dda12ac80572f78ab9
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/compat": patch
---

[#1381](https://github.com/embroider-build/embroider/pull/1381) : add tests for helper name collisions with html elements or js keywords : _by [@void-mAlex](https://github.com/void-mAlex)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how changeset is going to handle these package-less entries 😅
we'll see when #1404 updates!

# Change from: 21eae416d9fa85ea6f9be55945c44ab3da2c655b
#
# Each of these should be one of "patch", "minor", "major"
---

[#1364](https://github.com/embroider-build/embroider/pull/1364) : Unstable release sync with main : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli), [@ef4](https://github.com/ef4)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: 3a232cc04a68f86d0acfa5e7edfa764b990efdbf
#
# Each of these should be one of "patch", "minor", "major"
---

[#1401](https://github.com/embroider-build/embroider/pull/1401) : Add relevant changesets for the upcoming release and evaluate their impact : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change from: 3a9d8ade05e92b65045a01d59898f063e337fcd1
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/compat": minor
---

[#1392](https://github.com/embroider-build/embroider/pull/1392) : Allow running publish-unstable on workflow_dispatch : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Change from: 4f583c9b87a6da95b59ecde0939d4177dfd15d3b
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/core": "patch"
"@embroider/webpack": "patch"
"@embroider/core": "minor"
"@embroider/webpack": "minor"
---

[#1355](https://github.com/embroider-build/embroider/pull/1355) : Refactor self-resolution : _by [@ef4](https://github.com/ef4)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: 514566f036a28113d3aefd4430f256658c08e82e
#
# Each of these should be one of "patch", "minor", "major"
---

[#1395](https://github.com/embroider-build/embroider/pull/1395) : Revving yarn.lock : _by [@ef4](https://github.com/ef4)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change from: 55b12fea25b68bae28886e7705f9e3637ddf0b55
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/compat": minor
---

[#1389](https://github.com/embroider-build/embroider/pull/1389) : bump unstable versions by at least a patch : _by [@mansona](https://github.com/mansona)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# Change from: 5d605075b84e902609eccacd6decf7e6c4ca7250
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/addon-dev": minor
"@embroider/addon-shim": minor
"@embroider/compat": minor
"@embroider/core": minor
"@embroider/macros": minor
"@embroider/shared-internals": minor
"@embroider/util": minor
"@embroider/webpack": minor
---

[#1354](https://github.com/embroider-build/embroider/pull/1354) : Add glint helper types for more macros : _by [@vlascik](https://github.com/vlascik)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: 72d5a8e1edf20d0512cd98d1979b7b92360e6fd0
#
# Each of these should be one of "patch", "minor", "major"
---

[#1390](https://github.com/embroider-build/embroider/pull/1390) : Change namespace for publish-unstable cancel-in-progress : _by [@backspace](https://github.com/backspace)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: 77c945c528f8e828276e536d25473946f243337c
#
# Each of these should be one of "patch", "minor", "major"
---

[#1405](https://github.com/embroider-build/embroider/pull/1405) : Upgrade changeset-recover : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Change from: 936fd6373339a6848260f6c0a52f426127023299
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/compat": "major"
"@embroider/core": "major"
"@embroider/webpack": "major"
"@embroider/compat": "minor"
"@embroider/core": "minor"
"@embroider/webpack": "minor"
---

[#1373](https://github.com/embroider-build/embroider/pull/1373) : app tree resolving : _by [@ef4](https://github.com/ef4)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change from: a6cd4aac9b7497991b7b1acc18d0e78dccb8cd78
#
# Each of these should be one of "patch", "minor", "major"
"@embroider/util": patch
---

[#1388](https://github.com/embroider-build/embroider/pull/1388) : Enable prettier in ci : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: bae34674206d6e519e634adcd6f2e26f29030955
#
# Each of these should be one of "patch", "minor", "major"
---

[#1393](https://github.com/embroider-build/embroider/pull/1393) : continue deploying unstable packages even with an error : _by [@mansona](https://github.com/mansona)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: df7f4412bd8b1f996377a37bcf70e4c7937fb9c0
#
# Each of these should be one of "patch", "minor", "major"
---

[#1398](https://github.com/embroider-build/embroider/pull/1398) : Add prepare changelog workflow to automatically propose what should be in sync for us : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Change from: e05dfdc5496dd5b1aaa2684816c1a4e05c4f88c4
#
# Each of these should be one of "patch", "minor", "major"
---

[#1345](https://github.com/embroider-build/embroider/pull/1345) : Update release workflow : _by [@NullVoxPopuli](https://github.com/NullVoxPopuli)_
2 changes: 1 addition & 1 deletion .changeset/plenty-chairs-relate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@embroider/util': patch
'@embroider/util': minor
---

Improve types of `ensure-safe-component` helper
Expand Down
60 changes: 60 additions & 0 deletions docs/UPGRADE-GUIDES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# @embroider/core 2.x -> 3.x

## Breaking changes and how to resolve them

1. `unsupported ambiguous syntax`: When using `staticComponents` or `staticHelpers`, we no longer tolerate forms that are ambiguous between components, helpers, and this-property-fallback. For example, if
```hbs
{{thing}}
```

appears by itself in a (non-strict) template, it could mean:
- a component invocation: `<Thing />`
- a helper invocation: `{{ (thing) }}`
- property-this-fallback: `{{this.thing}}`

The benefit of this change is that we can get rid of a lot of gnarly compatbility code that reduced build performance and introduced subtle caveats.

Ember itself no longer supports property-this-fallback as of 4.0. And the Ember default blueprint has shipped with a default lint rule for multiple years that tells you not to use `{{thing}}`, in favor of angle bracket invocation or explicit `{{this.thing}}`.

If you're hitting this problem in your own code, change the ambiguous form to one of the three above unambiguous forms: a component with angle brackets, a helper with parentheses, or an explicit `this.` property.

If you're hitting this problem in third-party code that you don't want to patch, you can use a packageRule to tell Embroider how to disambiguate the case:

```js
// ember-cli-build.js
compatBuild(app, Webpack, {
packageRules: [
{
package: 'some-addon',
semverRange: '<= 5.0',
addonTemplates: {
'templates/components/some-component.hbs': {
disambiguate: {
// or "helper" or "data"
'thing': 'component',
},
},
}
}
]
})
```

2. `unsupported ambiguity between helper and component`: If you have forms that are ambiguous between being a helper and being a component, your settings for `staticComponents` and `staticHelpers` must now agree.

For example, `{{some-thing value=1}}` could be a component or a helper. If you have code like this, Embroider options like `{ staticHelpers: true, staticComponents: false }` are no longer allowed. They need to both be true or both be false.

You can fix this problem by either changing the forms to be unambiguous (in the same way as described in the previous section), or by changing one of the `staticCompnents` or `staticHelpers` flags to match the other one.


3. The `safeToIgnore` packageRule used to only suppress an error when a component was not found. Now it prevents us from even trying to resolve the component.

4. We no longer include a workaround for https://github.com/emberjs/ember.js/issues/19877, because Ember backported fixes to every major version that we support. Make sure you're on a supported Ember patch release. The oldest patch we support is ember-source 3.28.11.

This particular bug is important to us because whenever `staticHelpers` is enabled, we convert all helper invocations to lexically scoped helper invocations. So if you have any class-based helpers and you have `staticHelpers` enabled you definitely need the Ember bugfix.