Skip to content

Commit 2317c71

Browse files
authored
Merge pull request #188 from ember-learn/v2
Convert to a V2 addon and drop support for Ember < 3.28
2 parents a41f7d2 + 48a1c07 commit 2317c71

File tree

177 files changed

+17326
-69583
lines changed

Some content is hidden

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

177 files changed

+17326
-69583
lines changed

.ember-cli

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

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,18 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- master
7-
- main
8-
- "v*"
9-
pull_request:
105
branches:
116
- main
12-
- website-redesign
7+
- master
8+
pull_request: {}
139

14-
env:
15-
NODE_VERSION: 18
16-
FORCE_COLOR: 1
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1713

1814
jobs:
19-
lint:
20-
name: Linting
21-
runs-on: ubuntu-latest
22-
timeout-minutes: 10
23-
24-
steps:
25-
- uses: actions/checkout@v2
26-
- uses: actions/setup-node@v3
27-
with:
28-
node-version: ${{ env.NODE_VERSION }}
29-
cache: npm
30-
- run: npm ci
31-
- run: npm run lint
32-
33-
floating-dependencies:
34-
name: Floating Dependencies
35-
runs-on: ubuntu-latest
36-
timeout-minutes: 10
37-
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: actions/setup-node@v3
41-
with:
42-
node-version: ${{ env.NODE_VERSION }}
43-
cache: npm
44-
45-
- run: npm install --no-package-lock
46-
- run: npm test
47-
4815
test:
49-
name: Tests
16+
name: "Tests"
5017
runs-on: ubuntu-latest
5118
timeout-minutes: 10
5219
env:
@@ -55,47 +22,75 @@ jobs:
5522
PERCY_TOKEN: e01f89bea06d5ccd1207a5cd2799645e4942ecd0d8da739502a206d0fc7392fc
5623
RUN_PERCY_TESTS: true
5724

25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: pnpm/action-setup@v3
28+
with:
29+
version: 8
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 18
33+
cache: pnpm
34+
- name: Install Dependencies
35+
run: pnpm install --frozen-lockfile
36+
- name: Lint
37+
run: pnpm lint
38+
- name: Run Tests
39+
run: pnpm percy exec -- pnpm run test:ember
40+
working-directory: test-app
41+
42+
floating:
43+
name: "Floating Dependencies"
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 10
5846

5947
steps:
60-
- uses: actions/checkout@v2
61-
- uses: mansona/npm-lockfile-version@v1
62-
- uses: actions/setup-node@v3
48+
- uses: actions/checkout@v4
49+
- uses: pnpm/action-setup@v3
6350
with:
64-
node-version: ${{ env.NODE_VERSION }}
65-
cache: npm
66-
- run: npm ci
67-
- run: npx percy exec -- npm run test
51+
version: 8
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: 18
55+
cache: pnpm
56+
- name: Install Dependencies
57+
run: pnpm install --no-lockfile
58+
- name: Run Tests
59+
run: pnpm test
6860

6961
try-scenarios:
70-
name: "ember-try: ${{ matrix.ember-try-scenario }}"
62+
name: ${{ matrix.try-scenario }}
7163
runs-on: ubuntu-latest
72-
needs: test
64+
needs: 'test'
7365
timeout-minutes: 10
7466

7567
strategy:
7668
fail-fast: false
7769
matrix:
78-
ember-try-scenario:
79-
- 'ember-lts-3.20'
80-
- 'ember-lts-3.24'
81-
- 'ember-lts-3.28'
82-
- 'ember-release'
83-
- 'ember-default-with-jquery'
84-
- 'ember-classic'
85-
- 'embroider-safe'
86-
- 'embroider-optimized'
87-
- 'no-deprecations'
70+
try-scenario:
71+
- ember-lts-3.28
72+
- ember-lts-4.4
73+
- ember-lts-4.8
74+
- ember-lts-4.12
75+
- ember-lts-5.4
76+
- ember-release
77+
- embroider-safe
78+
- no-deprecations
8879

8980
steps:
90-
- uses: actions/checkout@v2
91-
- uses: actions/setup-node@v3
81+
- uses: actions/checkout@v4
82+
- uses: pnpm/action-setup@v3
9283
with:
93-
node-version: ${{ env.NODE_VERSION }}
94-
cache: npm
95-
96-
- run: npm ci
97-
- name: test
98-
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
84+
version: 8
85+
- uses: actions/setup-node@v4
86+
with:
87+
node-version: 18
88+
cache: pnpm
89+
- name: Install Dependencies
90+
run: pnpm install --frozen-lockfile
91+
- name: Run Tests
92+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
93+
working-directory: test-app
9994

10095
allow-fail-try-scenarios:
10196
name: ${{ matrix.try-scenario }} - Allowed to fail
@@ -113,18 +108,23 @@ jobs:
113108
- ember-beta
114109
- ember-canary
115110
- ember-release-no-deprecations
111+
- embroider-optimized # will fail until ember-cli-fastboot fixes the staticEmberSource issue
116112

117113
steps:
118-
- uses: actions/checkout@v2
119-
- uses: actions/setup-node@v3
114+
- uses: actions/checkout@v4
115+
- uses: pnpm/action-setup@v3
116+
with:
117+
version: 8
118+
- uses: actions/setup-node@v4
120119
with:
121-
node-version: ${{ env.NODE_VERSION }}
122-
cache: npm
123-
- run: npm i -g npm@8
124-
- run: npm ci
120+
node-version: 18
121+
cache: pnpm
122+
- name: Install Dependencies
123+
run: pnpm install --frozen-lockfile
125124
- name: Run Tests
126125
id: tests
127-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
126+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
127+
working-directory: test-app
128128
continue-on-error: true
129129
- uses: mainmatter/continue-on-error-comment@v1
130130
with:

.github/workflows/plan-release.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,36 @@ jobs:
4646
steps:
4747
- uses: actions/checkout@v4
4848
# We need to download lots of history so that
49-
# lerna-changelog can discover what's changed since the last release
49+
# github-changelog can discover what's changed since the last release
5050
with:
5151
fetch-depth: 0
52+
ref: 'main'
5253
- uses: actions/setup-node@v4
5354
with:
5455
node-version: 18
5556

56-
- run: npm ci
57+
- uses: pnpm/action-setup@v3
58+
with:
59+
version: 8
60+
- run: pnpm install --frozen-lockfile
5761

5862
- name: "Generate Explanation and Prep Changelogs"
5963
id: explanation
6064
run: |
61-
set -x
65+
set +e
6266
63-
npx release-plan prepare
67+
pnpm release-plan prepare 2> >(tee -a stderr.log >&2)
6468
65-
echo 'text<<EOF' >> $GITHUB_OUTPUT
66-
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
67-
echo 'EOF' >> $GITHUB_OUTPUT
69+
70+
if [ $? -ne 0 ]; then
71+
echo 'text<<EOF' >> $GITHUB_OUTPUT
72+
cat stderr.log >> $GITHUB_OUTPUT
73+
echo 'EOF' >> $GITHUB_OUTPUT
74+
else
75+
echo 'text<<EOF' >> $GITHUB_OUTPUT
76+
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
77+
echo 'EOF' >> $GITHUB_OUTPUT
78+
fi
6879
env:
6980
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
7081

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ jobs:
5050
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
5151
registry-url: 'https://registry.npmjs.org'
5252

53-
- run: npm ci
53+
- uses: pnpm/action-setup@v3
54+
with:
55+
version: 8
56+
- run: pnpm install --frozen-lockfile
5457
- name: npm publish
55-
run: npx release-plan publish
58+
run: pnpm release-plan publish
5659

5760
env:
5861
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/push-dist.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Because this library needs to be built,
2+
# we can't easily point package.json files at the git repo for easy cross-repo testing.
3+
#
4+
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
5+
# (configurable via the "branch" option below)
6+
name: Push dist
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
14+
jobs:
15+
push-dist:
16+
name: Push dist
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v3
23+
with:
24+
version: 8
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 18
28+
cache: pnpm
29+
- name: Install Dependencies
30+
run: pnpm install --frozen-lockfile
31+
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
32+
with:
33+
branch: dist
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
working-directory: 'guidemaker-ember-template'

.gitignore

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
4-
/dist/
5-
/tmp/
6-
73
# dependencies
8-
/bower_components/
9-
/node_modules/
4+
node_modules/
105

116
# misc
12-
/.env*
13-
/.pnp*
14-
/.sass-cache
15-
/.eslintcache
16-
/connect.lock
17-
/coverage/
18-
/libpeerconnection.log
19-
/npm-debug.log*
20-
/testem.log
21-
/yarn-error.log
7+
.env*
8+
.pnp*
9+
.pnpm-debug.log
10+
.sass-cache
11+
.eslintcache
12+
coverage/
13+
npm-debug.log*
14+
yarn-error.log
2215

2316
# ember-try
2417
/.node_modules.ember-try/
25-
/bower.json.ember-try
2618
/package.json.ember-try
19+
/package-lock.json.ember-try
20+
/yarn.lock.ember-try
21+
/pnpm-lock.ember-try.yaml
2722

28-
/.changelog/

0 commit comments

Comments
 (0)