Skip to content

Commit

Permalink
Merge branch 'master' into advance-rfc-0724
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet authored Aug 24, 2023
2 parents 82f5f41 + 354adc0 commit d85179a
Show file tree
Hide file tree
Showing 30 changed files with 2,663 additions and 117 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-rfcs-tooling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
with:
repository: emberjs/rfcs-tooling
path: rfcs-tooling
ref: 'v2.1.1'
ref: 'v3.0.0'

- uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/advance-rfc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
echo "A new RFC was added"
echo "value=true" >> $GITHUB_OUTPUT
else
node rfcs-tooling/has-stage-changed.js ${{ github.event.before }} ${{ steps.rfcs.outputs.modified-rfc }}
node rfcs-tooling/scripts/has-stage-changed.mjs ${{ github.event.before }} ${{ steps.rfcs.outputs.modified-rfc }}
if [[ $? == 0 ]]; then
echo "## Yes, stage has changed" >> $GITHUB_STEP_SUMMARY
echo "value=true" >> $GITHUB_OUTPUT
Expand All @@ -69,7 +69,7 @@ jobs:
if: steps.has-stage-changed.outputs.value == 'true'
id: new-stage
run: |
new_stage=`node rfcs-tooling/find-next-stage.js ${{ steps.rfcs.outputs.modified-rfc }}`
new_stage=`node rfcs-tooling/scripts/find-next-stage.mjs ${{ steps.rfcs.outputs.modified-rfc }}`
echo "New Stage: $new_stage"
echo "value=$new_stage" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
uses: ./.github/actions/setup-rfcs-tooling

- name: Lint the frontmatter of all RFCs
run: node ./rfcs-tooling/lint-rfc-frontmatter.js text/*.md
run: node ./rfcs-tooling/scripts/lint-rfc-frontmatter.mjs text/*.md
2 changes: 1 addition & 1 deletion .github/workflows/generate-rfc-frontmatter-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Generate frontmatter data file
run: |
node rfcs-tooling/list-frontmatter.js text/*.md > rfc-data.json
node rfcs-tooling/scripts/list-frontmatter.mjs text/*.md > rfc-data.json
- uses: actions/upload-artifact@v3
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/newly-added-rfcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

- name: Verify stage of newly added RFC is `accepted` in frontmatter
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ needs.check-rfcs.outputs.modified-rfc }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ needs.check-rfcs.outputs.modified-rfc }}`
stage=`echo $frontmatter | jq '.stage'`
if [[ $stage != '"accepted"' ]]; then
echo "::error::Newly added RFCs must have the stage 'accepted' in the frontmatter"
Expand All @@ -113,8 +113,7 @@ jobs:
- name: Test RFC Filename matches PR Number that adds it
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: node check-filename-matches-pr.js $PR_NUMBER ${{ needs.check-rfcs.outputs.modified-rfc }}
working-directory: rfcs-tooling
run: node rfcs-tooling/scripts/check-filename-matches-pr.mjs $PR_NUMBER ${{ needs.check-rfcs.outputs.modified-rfc }}

check-accepted-pr-url:
name: Verify Accepted PR URL is correct
Expand All @@ -129,7 +128,7 @@ jobs:

- name: Verify Accepted PR URL is correct
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ needs.check-rfcs.outputs.modified-rfc }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ needs.check-rfcs.outputs.modified-rfc }}`
accepted_pr=`echo $frontmatter | jq '.prs.accepted'`
accepted_pr=${accepted_pr//\"/}
expected_pr="${{ github.event.pull_request.html_url }}"
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/open-advancement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ jobs:

- name: Update frontmatter
run: |
node rfcs-tooling/update-rfc-stage.js ${{ inputs.new-stage }} ${{ inputs.rfc-path }}
node rfcs-tooling/scripts/update-rfc-stage.mjs ${{ inputs.new-stage }} ${{ inputs.rfc-path }}
- name: Set variables for use in PR
id: pr-variables
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ inputs.rfc-path }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ inputs.rfc-path }}`
ready_for_release_pr=`echo $frontmatter | jq '.prs."ready-for-release"'`
ready_for_release_pr=${ready_for_release_pr//\"/}
released_pr=`echo $frontmatter | jq '.prs.released'`
released_pr=${released_pr//\"/}
title=`echo $frontmatter | jq '.title'`
if [[ ${{ inputs.new-stage }} == "ready-for-release" ]]; then
pretty_stage="Ready for Release"
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' .github/PULL_REQUEST_TEMPLATE/advance-to-ready-for-release.md`
Expand All @@ -53,23 +54,24 @@ jobs:
echo 'EOF' >> $GITHUB_OUTPUT
echo "Pretty Stage: $pretty_stage"
echo "pretty-stage=$pretty_stage" >> $GITHUB_OUTPUT
echo "title=$title" >> $GITHUB_OUTPUT
- name: Open PR
id: create-pr
uses: peter-evans/create-pull-request@v4.2.0
with:
token: ${{ secrets.personal-access-token }}
commit-message: "Advance RFC to Stage ${{ inputs.new-stage }}"
commit-message: "Advance RFC {{ inputs.rfc-number }} to Stage ${{ inputs.new-stage }}"
add-paths: 'text'
branch: "advance-rfc-${{ inputs.rfc-number }}"
title: "Advance RFC #${{ inputs.rfc-number}} to Stage ${{ steps.pr-variables.outputs.pretty-stage }}"
title: "Advance RFC #${{ inputs.rfc-number}} `${{ steps.pr-variables.outputs.title }}` to Stage ${{ steps.pr-variables.outputs.pretty-stage }}"
body: "${{ steps.pr-variables.outputs.body }}"
labels: "RFC Advancement,S-${{ steps.pr-variables.outputs.pretty-stage}}"
draft: true

- name: Add new PR link to RFC frontmatter
run: |
node rfcs-tooling/update-advancement-pr.js ${{ inputs.rfc-path }} ${{ inputs.new-stage}} ${{ steps.create-pr.outputs.pull-request-url }}
node rfcs-tooling/scripts/update-advancement-pr.mjs ${{ inputs.rfc-path }} ${{ inputs.new-stage}} ${{ steps.create-pr.outputs.pull-request-url }}
- name: Update PR
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-opening-advancement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Find new stage
id: new-stage
run: |
new_stage=`node rfcs-tooling/find-next-stage.js ${{ inputs.rfc-path }}`
new_stage=`node rfcs-tooling/scripts/find-next-stage.mjs ${{ inputs.rfc-path }}`
echo "New Stage: $new_stage"
echo "value=$new_stage" >> $GITHUB_OUTPUT
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ that RFC.

RFCs in [Final Comment Periods](#final-comment-periods-fcp) are labeled with
[Final Comment Period](https://github.com/emberjs/rfcs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3A%22Final+Comment+Period%22)
and are announced on the [Ember twitter account](https://twitter.com/emberjs).
and are announced in `#news-and-announcements` on [Ember Discord](https://discord.gg/emberjs) and
on the [Ember twitter account](https://twitter.com/emberjs).

[Quick links](#quick-links-for-pull-requests-for-proposed-and-advancing-rfcs)
are provided at the top of the README to help you review what you are interested in.
Expand Down Expand Up @@ -450,9 +451,9 @@ further guidance.

For certain stage advancements, a _final comment period_ (FCP) is required. This
is a period lasting 7 days. The beginning of this period will be signaled with a
comment and tag on the RFC's pull request. Furthermore,
[Ember's official Twitter account](https://twitter.com/emberjs) will post a
tweet about the RFC to attract the community's attention.
comment and tag on the RFC's pull request. Furthermore, a message will be posted in
`#news-and-announcements` on [Ember Discord](https://discord.gg/emberjs) and on the
[official Ember Twitter account](https://twitter.com/emberjs) to attract the community's attention.

An RFC can be modified based upon feedback from the [core teams] and community
during the final comment period. Significant modifications may trigger a new
Expand Down
14 changes: 9 additions & 5 deletions text/0236-deprecation-ember-string.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
---
stage: recommended
start-date: 2017-07-14T00:00:00.000Z
release-date: 2020-12-28T00:00:00.000Z
release-date: 2023-01-12T00:00:00.000Z
release-versions:
ember-source: v3.24.0

ember-source: v4.10.0
teams:
- framework
- typescript
prs:
accepted: https://github.com/emberjs/rfcs/pull/236
accepted: 'https://github.com/emberjs/rfcs/pull/236'
ready-for-release: 'https://github.com/emberjs/rfcs/pull/892'
released: 'https://github.com/emberjs/rfcs/pull/897'
recommended: 'https://github.com/emberjs/rfcs/pull/898'
project-link:
meta:
tracking: https://github.com/emberjs/rfc-tracking/issues/26
tracking: 'https://github.com/emberjs/ember.js/issues/20340'
legacy-tracking: 'https://github.com/emberjs/rfc-tracking/issues/26'
---

# Summary
Expand Down
2 changes: 1 addition & 1 deletion text/0331-deprecate-globals-resolver.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
stage: released
stage: recommended
start-date: 2018-05-08T00:00:00.000Z
release-date: 2020-01-20T00:00:00.000Z
release-versions:
Expand Down
4 changes: 2 additions & 2 deletions text/0487-custom-model-classes.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
stage: released # FIXME: This may be recommended
start-date: 2019-05-09T00:00:00.000Z
release-date: 2019-09-19T00:00:00.000Z
release-date: 2021-08-20T00:00:00.000Z
release-versions:
ember-source: v3.13.0
ember-data: v3.28.0

teams:
- data
Expand Down
21 changes: 12 additions & 9 deletions text/0496-handlebars-strict-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ template string and returning a ready-to-be-consumed template object (the
output of `createTemplateFactory`), instead of the wire format. This is
mostly used for compiling templates at runtime, which is pretty rare.

We propose to introduce a new `strict` option to the `precompile` and `compile`
We propose to introduce a new `strictMode` option to the `precompile` and `compile`
functions to enable strict mode compilation:

```js
import { precompileTemplate } from '@ember/template-compilation';

precompileTemplate('Hello, {{name}}!', {
moduleName: 'hello.hbs',
strict: true
strictMode: true
});
```

Expand Down Expand Up @@ -363,12 +363,13 @@ precompileTemplate(`{{#let this.session.currentUser as |user|}}
<BlogPost @title={{titleize @model.title}} @body={{@model.body}} @author={{user}} />
{{/let}}`, {
moduleName: 'index.hbs',
strict: true
strictMode: true
}); /* => `{
"id": "ANJ73B7b",
"block": "{\"statements\":[\"...\"]}",
"meta": { "moduleName": "index.hbs" },
"scope": () => [BlogPost, titleize]
"scope": () => [BlogPost, titleize],
"isStrictMode": true
}` */
```

Expand Down Expand Up @@ -411,7 +412,8 @@ export default createTemplateFactory({
"id": "ANJ73B7b",
"block": "{\"statements\":[\"...\"]}",
"meta": { "moduleName": "index.hbs" },
"scope": () => [BlogPost, titleize]
"scope": () => [BlogPost, titleize],
"isStrictMode": true
});
```

Expand All @@ -434,7 +436,8 @@ precompileTemplate(`{{#let this.session.currentUser as |user|}}
{{/let}}`, {
moduleName: 'index.hbs',
strict: true,
scope: ['BlogPost', 'titleize']
scope: ['BlogPost', 'titleize'],
isStrictMode: true
});
```

Expand Down Expand Up @@ -540,7 +543,7 @@ strict mode semantics at this stage. Instead, the guides should be updated to
feature template imports or single-file components when they become available.

As for the low-level APIs, we should update the API documentation to cover the
new flags (`strict` and `scope`). The documentation should cover the details of
new flags (`strictMode` and `scope`). The documentation should cover the details of
the "ambient scope" feature discussed in this RFC, and emphasize that it is
intended for linking static values such as helpers and components.

Expand All @@ -566,7 +569,7 @@ discussed in the contextual helpers RFC.

By adopting these piecemeal, we will also have to define the interaction and
combined semantics for any possible combinations of these flags, and tooling
will be unable to take advantage of the improved static guarentees without
will be unable to take advantage of the improved static guarantees without
doing a lot of work to account for all these possibilities.

2. Instead of proposing a standalone strict mode, we could just bundle these
Expand All @@ -578,7 +581,7 @@ discussed in the contextual helpers RFC.

3. Switch to HTML attributes by default in strict mode.

Today, Glimmer uses a complicated set of huristics to decide if a bound HTML
Today, Glimmer uses a complicated set of heuristics to decide if a bound HTML
"attribute" syntax should indeed be set using `setAttribute` or set as a
JavaScript property using `element[...] = ...;`. This does not always work
well in practice, and it causes a lot of confusion and complexity.
Expand Down
6 changes: 3 additions & 3 deletions text/0580-destroyables.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
stage: released # FIXME: This may be recommended
stage: recommended
start-date: 2020-01-10T00:00:00.000Z
release-date: 2020-10-05T00:00:00.000Z
release-versions:
ember-source: v3.22.0

teams:
- framework
prs:
accepted: https://github.com/emberjs/rfcs/pull/580
accepted: 'https://github.com/emberjs/rfcs/pull/580'
recommended: 'https://github.com/emberjs/rfcs/pull/915'
project-link:
---

Expand Down
2 changes: 1 addition & 1 deletion text/0625-helper-managers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
stage: released # FIXME: This may be a further stage
stage: recommended
start-date: 2020-04-28T00:00:00.000Z
release-date: 2020-11-16T00:00:00.000Z
release-versions:
Expand Down
6 changes: 3 additions & 3 deletions text/0631-refresh-method-for-router-service.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
stage: released # FIXME: This may be recommended
stage: recommended
start-date: 2020-05-23T00:00:00.000Z
release-date: 2021-12-28T00:00:00.000Z
release-versions:
ember-source: v4.1.0

teams:
- framework
prs:
accepted: https://github.com/emberjs/rfcs/pull/631
accepted: 'https://github.com/emberjs/rfcs/pull/631'
recommended: 'https://github.com/emberjs/rfcs/pull/913'
project-link:
---

Expand Down
10 changes: 5 additions & 5 deletions text/0637-customizable-test-setups.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ start-date: 2020-06-01T00:00:00.000Z
release-date: 2020-05-02T00:00:00.000Z
release-versions:
ember-source: v4.4.0
# ember-cli: FIXME
ember-cli: v4.3.0

teams:
- framework
Expand Down Expand Up @@ -50,7 +50,7 @@ For example:

```js
import { module, test } from 'qunit';
import setupTest from 'ember-qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Service | tomster', function(hooks) {
setupTest(hooks);
Expand All @@ -64,7 +64,7 @@ manually be changed to:

```js
import { module, test } from 'qunit';
import setupTest from 'my-app/tests/helpers';
import { setupTest } from 'my-app/tests/helpers';

module('Unit | Service | tomster', function(hooks) {
setupTest(hooks);
Expand All @@ -77,8 +77,8 @@ or where the setup functions are to be composed, this must be added:

```js
import { module, test } from 'qunit';
import setupTest from 'ember-qunit';
import setupMyTest from 'my-app/tests/helpers';
import { setupTest } from 'ember-qunit';
import { setupMyTest } from 'my-app/tests/helpers';

module('Unit | Service | tomster', function(hooks) {
setupTest(hooks);
Expand Down
9 changes: 6 additions & 3 deletions text/0739-ember-data-deprecate-non-strict-relationships.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
stage: accepted # FIXME: This may be a further stage
stage: recommended
start-date: 2021-04-23T00:00:00.000Z
release-date:
release-date: 2022-09-06T00:00:00.000Z
release-versions:
ember-data: v4.7.0
teams:
- data
prs:
accepted: https://github.com/emberjs/rfcs/pull/739
accepted: 'https://github.com/emberjs/rfcs/pull/739'
ready-for-release: 'https://github.com/emberjs/rfcs/pull/909'
released: 'https://github.com/emberjs/rfcs/pull/924'
project-link:
---

Expand Down
Loading

0 comments on commit d85179a

Please sign in to comment.