Skip to content

Commit ec3de04

Browse files
committed
Merge branch 'main' into cleanup-7-0-barrel
2 parents 40e59f9 + 0673aaf commit ec3de04

443 files changed

Lines changed: 23261 additions & 52446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ inputs:
1313
runs:
1414
using: 'composite'
1515
steps:
16-
- uses: pnpm/action-setup@v4
16+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1717
name: Install pnpm
1818
with:
1919
run_install: false
2020
- name: Install Node.js
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2222
with:
2323
node-version: '${{ inputs.node-version }}'
2424
registry-url: 'https://registry.npmjs.org'
2525
cache: pnpm
2626

27-
- run: pnpm install ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
27+
- run: pnpm install ${INSTALL_OPTIONS}
28+
env:
29+
INSTALL_OPTIONS: ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
2830
shell: bash

.github/dependabot.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/renovate.json5

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
extends: ["config:recommended"],
4+
automerge: false,
5+
lockFileMaintenance: true,
6+
dependencyDashboard: true,
7+
schedule: ["every weekend"],
8+
minimumReleaseAge: "10 days",
9+
prConcurrentLimit: 5,
10+
packageRules: [
11+
{
12+
description: "All @babel/* packages",
13+
groupName: "babel",
14+
matchPackageNames: ["@babel/{/,}**"],
15+
},
16+
{
17+
description: "All @embroider/* packages",
18+
groupName: "embroider",
19+
matchPackageNames: ["@embroider/{/,}**"],
20+
},
21+
{
22+
description: "eslint and releated packages",
23+
groupName: "eslint",
24+
matchPackageNames: ["eslint{/,}**"],
25+
},
26+
],
27+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env node
2+
import fs from "node:fs";
3+
import path from "node:path";
4+
import { execSync } from "node:child_process";
5+
6+
const [appDir, targetDir, replaceTestScript = "false"] = process.argv.slice(2);
7+
8+
if (!appDir || !targetDir) {
9+
console.error("Usage: update-smoke-test-template.sh <appDir> <targetDir>");
10+
process.exit(1);
11+
}
12+
13+
function readJson(filePath) {
14+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
15+
}
16+
17+
function writeJson(filePath, data) {
18+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
19+
}
20+
21+
const resolvedAppDir = path.resolve(appDir);
22+
const resolvedTargetDir = path.resolve(targetDir);
23+
24+
fs.rmSync(path.join(resolvedAppDir, ".ember-cli"), { force: true });
25+
26+
const pkgPath = path.join(resolvedAppDir, "package.json");
27+
const pkg = readJson(pkgPath);
28+
pkg.scripts = pkg.scripts || {};
29+
const shouldReplaceTest = replaceTestScript === "true";
30+
if (shouldReplaceTest) {
31+
pkg.scripts.test = "ember test";
32+
}
33+
34+
if (pkg.devDependencies && pkg.devDependencies["@glimmer/component"]) {
35+
pkg.devDependencies["@glimmer/component"] = "workspace:^";
36+
} else if (pkg.dependencies && pkg.dependencies["@glimmer/component"]) {
37+
pkg.dependencies["@glimmer/component"] = "workspace:^";
38+
} else {
39+
pkg.devDependencies = pkg.devDependencies || {};
40+
pkg.devDependencies["@glimmer/component"] = "workspace:^";
41+
}
42+
43+
if (pkg.devDependencies && pkg.devDependencies["ember-source"]) {
44+
pkg.devDependencies["ember-source"] = "workspace:*";
45+
}
46+
47+
pkg.devDependencies = pkg.devDependencies || {};
48+
const trackedBuiltInsVersion = execSync("npm view tracked-built-ins version", {
49+
encoding: "utf8"
50+
}).trim();
51+
pkg.devDependencies["tracked-built-ins"] = `^${trackedBuiltInsVersion}`;
52+
53+
writeJson(pkgPath, pkg);
54+
55+
const envPath = path.join(resolvedAppDir, "config", "environment.js");
56+
const source = fs.readFileSync(envPath, "utf8");
57+
if (!source.includes("_OVERRIDE_DEPRECATION_VERSION")) {
58+
const block = [
59+
"/* The following enables the infrastructure allow us to test as if deprecations",
60+
" have been turned into errors at a specific version.",
61+
"*/",
62+
"_OVERRIDE_DEPRECATION_VERSION: process.env.OVERRIDE_DEPRECATION_VERSION,"
63+
];
64+
const updated = source.replace(
65+
/EmberENV:\s*\{\s*\n([ \t]*)/,
66+
(match, indent) => {
67+
const pad = `${indent} `;
68+
const injected = block.map((line) => pad + line).join("\n");
69+
return match + injected + "\n" + indent;
70+
}
71+
);
72+
if (updated === source) {
73+
throw new Error("Failed to locate EmberENV block for injection.");
74+
}
75+
fs.writeFileSync(envPath, updated);
76+
}
77+
78+
fs.rmSync(resolvedTargetDir, { recursive: true, force: true });
79+
fs.renameSync(resolvedAppDir, resolvedTargetDir);

.github/workflows/alpha-releases.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ on:
55
- cron: '0 20 * * 3' # weekly (Wednesday)
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read # PAT used for push
10+
811
jobs:
912
tests:
1013
uses: ./.github/workflows/ci-jobs.yml
1114

1215
release:
13-
permissions:
14-
contents: read # PAT used for push
15-
1616
name: Tag + Push
1717
runs-on: ubuntu-latest
1818
needs: [ tests ]
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
persist-credentials: false
2323
- uses: ./.github/actions/setup
@@ -31,9 +31,9 @@ jobs:
3131
export NEXT_ALPHA=`node bin/next-alpha-version.js ${LATEST_ALPHA}`
3232
echo "NEXT_ALPHA=$NEXT_ALPHA" >> $GITHUB_ENV
3333
- name: bump version
34-
run: npm version ${{env.NEXT_ALPHA}} --allow-same-version --no-git-tag-version
34+
run: npm version ${NEXT_ALPHA} --allow-same-version --no-git-tag-version
3535
- name: create tag
36-
run: git tag v${{env.NEXT_ALPHA}}-ember-source
36+
run: git tag v${NEXT_ALPHA}-ember-source
3737
- name: push tag
3838
# Push in a way that WILL trigger other workflows
39-
run: git push https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_TOKEN }}@github.com/${GITHUB_REPOSITORY} v${{env.NEXT_ALPHA}}-ember-source
39+
run: git push https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_TOKEN }}@github.com/${GITHUB_REPOSITORY} v${NEXT_ALPHA}-ember-source

.github/workflows/ci-jobs.yml

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
outputs:
1414
matrix: ${{ steps.set-matrix.outputs.matrix }}
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
persist-credentials: false
1719
- uses: ./.github/actions/setup
1820
- name: linting
1921
run: pnpm lint
@@ -27,12 +29,16 @@ jobs:
2729
name: Type Checking (current version)
2830
runs-on: ubuntu-latest
2931
steps:
30-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
3135
- uses: ./.github/actions/setup
3236
- name: build types
3337
run: pnpm build:types
3438
- name: Check internal types
3539
run: pnpm type-check:internals
40+
- name: Check @handlebars/parser types
41+
run: pnpm type-check:handlebars
3642
- name: Check published types
3743
run: pnpm type-check:types
3844

@@ -44,7 +50,9 @@ jobs:
4450
matrix:
4551
ts-version: ["5.2", "5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"]
4652
steps:
47-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
54+
with:
55+
persist-credentials: false
4856
- uses: ./.github/actions/setup
4957
- name: build stable type definitions
5058
run: pnpm build:types
@@ -57,7 +65,9 @@ jobs:
5765
name: Basic Test
5866
runs-on: ubuntu-latest
5967
steps:
60-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69+
with:
70+
persist-credentials: false
6171
- uses: ./.github/actions/setup
6272
- name: build
6373
run: pnpm vite build --mode=development
@@ -91,7 +101,9 @@ jobs:
91101
ENABLE_OPTIONAL_FEATURES: "true"
92102

93103
steps:
94-
- uses: actions/checkout@v4
104+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+
with:
106+
persist-credentials: false
95107
- uses: ./.github/actions/setup
96108
- name: build
97109
run: pnpm vite build --mode=${{ matrix.BUILD || 'development' }}
@@ -111,7 +123,9 @@ jobs:
111123
runs-on: ubuntu-latest
112124
needs: [basic-test, lint, types]
113125
steps:
114-
- uses: actions/checkout@v4
126+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
127+
with:
128+
persist-credentials: false
115129
- uses: ./.github/actions/setup
116130
- name: build
117131
env:
@@ -141,7 +155,9 @@ jobs:
141155
fail-fast: false
142156
matrix: ${{fromJson(needs.lint.outputs.matrix)}}
143157
steps:
144-
- uses: actions/checkout@v4
158+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
159+
with:
160+
persist-credentials: false
145161
- uses: ./.github/actions/setup
146162
with:
147163
use_lockfile: "false"
@@ -150,28 +166,58 @@ jobs:
150166
- name: test
151167
working-directory: smoke-tests/scenarios
152168
run: |
153-
${{ matrix.command }}
169+
${MATRIX_COMMAND}
170+
env:
171+
MATRIX_COMMAND: ${{ matrix.command }}
172+
173+
smoke-test-with-deprecations-removed:
174+
name: Smoke tests with Deprecations Removed (Full Ember Apps)
175+
runs-on: ubuntu-latest
176+
needs: [basic-test, lint, types]
177+
strategy:
178+
fail-fast: false
179+
matrix: ${{fromJson(needs.lint.outputs.matrix)}}
180+
steps:
181+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
182+
with:
183+
persist-credentials: false
184+
- uses: ./.github/actions/setup
185+
with:
186+
use_lockfile: "false"
187+
- name: build
188+
run: pnpm build
189+
- name: test
190+
env:
191+
OVERRIDE_DEPRECATION_VERSION: "15.0.0"
192+
MATRIX_COMMAND: ${{ matrix.command }}
193+
working-directory: smoke-tests/scenarios
194+
run: |
195+
${MATRIX_COMMAND}
154196
155197
node-test:
156198
name: Node.js Tests
157199
runs-on: ubuntu-latest
158200
needs: [basic-test, lint, types]
159201
steps:
160-
- uses: actions/checkout@v4
202+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
203+
with:
204+
persist-credentials: false
161205
- uses: ./.github/actions/setup
162206
- name: build
163207
env:
164208
SHOULD_TRANSPILE_FOR_NODE: true
165209
run: pnpm build
166210
- name: test
167-
run: pnpm test:node
211+
run: pnpm test:node && pnpm --filter "@handlebars/parser" test
168212

169213
blueprint-test:
170214
name: Blueprint Tests
171215
runs-on: ubuntu-latest
172216
needs: [lint]
173217
steps:
174-
- uses: actions/checkout@v4
218+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
219+
with:
220+
persist-credentials: false
175221
- uses: ./.github/actions/setup
176222
- name: test
177223
run: pnpm test:blueprints
@@ -181,12 +227,14 @@ jobs:
181227
runs-on: ubuntu-22.04 # Firefox is not installing on Ubuntu 24 on GitHub Actions https://github.com/browser-actions/setup-firefox/issues/622
182228
needs: [basic-test, lint, types]
183229
steps:
184-
- uses: actions/checkout@v4
230+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
231+
with:
232+
persist-credentials: false
185233
- uses: ./.github/actions/setup
186234
- name: build
187235
run: pnpm vite build --mode=development
188236
- name: Setup firefox
189-
uses: browser-actions/setup-firefox@latest
237+
uses: browser-actions/setup-firefox@fcf821c621167805dd63a29662bd7cb5676c81a8 # v1.7.1
190238
with:
191239
firefox-version: 115.9.1esr
192240
- run: firefox --version
@@ -196,10 +244,13 @@ jobs:
196244
perf-check:
197245
name: Perf script still works
198246
runs-on: ubuntu-latest
247+
timeout-minutes: 10
248+
if: ${{ !startsWith(github.ref, 'refs/tags/') }} # Don't run on tags
199249
steps:
200-
- uses: actions/checkout@v6
250+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
201251
with:
202252
fetch-depth: 0
253+
persist-credentials: false
203254
- uses: ./.github/actions/setup
204255
- name: Check that the perf script works, so we don't regress
205256
run: RUNS='2' pnpm bench

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Only run on pushes to branches that are not from the cron workflow
2929
if: github.event_name == 'push' && contains(github.ref, 'cron') != true
3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.js
3232
- uses: ./.github/actions/setup
3333
- name: build for publish
3434
run: node bin/build-for-publishing.js
@@ -46,7 +46,7 @@ jobs:
4646
# Only run on pushes to main
4747
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.js
5050
- uses: ./.github/actions/setup
5151
- name: build for publish
5252
run: node bin/build-for-publishing.js
@@ -65,7 +65,7 @@ jobs:
6565
needs: [ tests ]
6666
if: failure() && contains(github.ref, 'cron') == true
6767
steps:
68-
- uses: sarisia/actions-status-discord@v1
68+
- uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
6969
with:
7070
webhook: ${{ secrets.FRAMEWORK_WEBHOOK }}
7171
status: 'Failure'

0 commit comments

Comments
 (0)