Skip to content

Commit 8af9c0b

Browse files
authored
Move to new v2 blueprint (#627)
* Convert to new v2 addon blueprint * Fix lint * More lint fixes * Move docs to glint v2 and fix docs lint
1 parent aae6b1e commit 8af9c0b

129 files changed

Lines changed: 4187 additions & 5481 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.

.env.development

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is committed to git and should not contain any secrets.
2+
#
3+
# Vite recommends using .env.local or .env.[mode].local if you need to manage secrets
4+
# SEE: https://vite.dev/guide/env-and-mode.html#env-files for more information.
5+
6+
7+
# Default NODE_ENV with vite build --mode=test is production
8+
NODE_ENV=development

.github/workflows/ci.yml

Lines changed: 32 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313

1414
jobs:
1515
lint:
16-
name: Lint
16+
name: "Lints"
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 10
1919

@@ -22,101 +22,78 @@ jobs:
2222
- uses: pnpm/action-setup@v4
2323
- uses: actions/setup-node@v4
2424
with:
25-
node-version: 20.x
25+
node-version: 22
2626
cache: pnpm
27-
28-
- name: 'Install dependencies'
27+
- name: Install Dependencies
2928
run: pnpm install --frozen-lockfile
30-
31-
- run: pnpm build
32-
- run: pnpm i -f # re-sync injected deps
33-
3429
- name: Lint
35-
run: pnpm --filter ember-power-calendar lint
30+
run: pnpm lint
3631

3732
test:
3833
name: "Tests"
3934
runs-on: ubuntu-latest
40-
needs: lint
35+
timeout-minutes: 10
36+
outputs:
37+
matrix: ${{ steps.set-matrix.outputs.matrix }}
4138

4239
steps:
4340
- uses: actions/checkout@v4
4441
- uses: pnpm/action-setup@v4
45-
46-
- name: Install Node
47-
uses: actions/setup-node@v4
42+
- uses: actions/setup-node@v4
4843
with:
49-
node-version: 20.x
44+
node-version: 22
5045
cache: pnpm
51-
5246
- name: Install Dependencies
5347
run: pnpm install --frozen-lockfile
54-
55-
- run: pnpm build
56-
- run: pnpm i -f # re-sync injected deps
57-
5848
- name: Run Tests
59-
run: pnpm --filter test-app test:ember
49+
run: pnpm test
50+
# For the Try Scenarios
51+
- id: set-matrix
52+
run: |
53+
echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT
54+
6055
6156
floating:
6257
name: "Floating Dependencies"
6358
runs-on: ubuntu-latest
64-
needs: lint
59+
timeout-minutes: 10
6560

6661
steps:
6762
- uses: actions/checkout@v4
6863
- uses: pnpm/action-setup@v4
6964
- uses: actions/setup-node@v4
7065
with:
71-
node-version: 20.x
66+
node-version: 22
7267
cache: pnpm
73-
7468
- name: Install Dependencies
75-
run: pnpm install --frozen-lockfile
76-
77-
- run: pnpm build
78-
- run: pnpm i -f # re-sync injected deps
79-
69+
run: pnpm install --no-lockfile
8070
- name: Run Tests
81-
run: pnpm --filter test-app test:ember
71+
run: pnpm test
8272

8373
try-scenarios:
84-
name: ${{ matrix.try-scenario }}
74+
name: ${{ matrix.name }}
8575
runs-on: ubuntu-latest
86-
continue-on-error: true
87-
needs: test
88-
76+
needs: "test"
77+
timeout-minutes: 10
8978
strategy:
9079
fail-fast: false
91-
matrix:
92-
try-scenario:
93-
- ember-lts-4.12
94-
- ember-lts-5.4
95-
- ember-lts-5.8
96-
- ember-lts-5.12
97-
- ember-lts-6.4
98-
- ember-lts-6.8
99-
- ember-release
100-
- ember-beta
101-
- ember-canary
102-
- embroider-safe
103-
- embroider-optimized
80+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
10481

10582
steps:
10683
- uses: actions/checkout@v4
10784
- uses: pnpm/action-setup@v4
10885
- uses: actions/setup-node@v4
10986
with:
110-
node-version: 20
87+
node-version: 22
11188
cache: pnpm
89+
- name: Apply Scenario
90+
run: |
91+
pnpm dlx @embroider/try apply ${{ matrix.name }}
11292
11393
- name: Install Dependencies
114-
run: pnpm install --frozen-lockfile
115-
116-
- run: pnpm build
117-
- run: pnpm i -f # re-sync injected deps
118-
94+
run: pnpm install --no-lockfile
11995
- name: Run Tests
120-
env:
121-
EMBER_TRY_SCENARIO: ${{ matrix.try-scenario }}
122-
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO --skip-cleanup
96+
run: |
97+
pnpm test
98+
99+
env: ${{ matrix.env }}

.github/workflows/docs.yml

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,24 @@ permissions:
1212
contents: read
1313
pages: write
1414
id-token: write
15-
15+
1616
jobs:
1717
lint:
18-
name: Lint
18+
name: "Lints"
1919
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
2022
steps:
2123
- uses: actions/checkout@v4
2224
- uses: pnpm/action-setup@v4
23-
2425
- uses: actions/setup-node@v4
2526
with:
26-
node-version: 18.x
27-
cache: 'pnpm'
28-
29-
- name: 'Install dependencies'
27+
node-version: 22
28+
cache: pnpm
29+
- name: Install Dependencies
3030
run: pnpm install --frozen-lockfile
31-
32-
- run: pnpm build
33-
- run: pnpm i -f # re-sync injected deps
34-
31+
- name: Run Addon Build
32+
run: pnpm build
3533
- name: Lint
3634
run: pnpm --filter docs lint
3735

@@ -43,21 +41,16 @@ jobs:
4341
steps:
4442
- uses: actions/checkout@v4
4543
- uses: pnpm/action-setup@v4
46-
47-
- name: Install Node
48-
uses: actions/setup-node@v4
44+
- uses: actions/setup-node@v4
4945
with:
50-
node-version: 18.x
46+
node-version: 22
5147
cache: pnpm
52-
5348
- name: Install Dependencies
5449
run: pnpm install --frozen-lockfile
55-
56-
- run: pnpm build
57-
- run: pnpm i -f # re-sync injected deps
58-
50+
- name: Run Addon Build
51+
run: pnpm build
5952
- name: Run Tests
60-
run: pnpm --filter docs test:ember
53+
run: pnpm --filter docs test
6154

6255
build-documentation:
6356
name: Build documentation
@@ -68,30 +61,22 @@ jobs:
6861
steps:
6962
- uses: actions/checkout@v4
7063
- uses: pnpm/action-setup@v4
71-
72-
- name: Install Node
73-
uses: actions/setup-node@v4
64+
- uses: actions/setup-node@v4
7465
with:
75-
node-version: 18.x
66+
node-version: 22
7667
cache: pnpm
77-
7868
- name: Install Dependencies
7969
run: pnpm install --frozen-lockfile
80-
81-
- run: pnpm build
82-
- run: pnpm i -f # re-sync injected deps
83-
70+
- name: Run Addon Build
71+
run: pnpm build
8472
- name: Run Tests
8573
run: pnpm --filter docs build
86-
8774
- name: Copy 404 page
8875
run: cp ./docs/404.html ./docs/dist/404.html
89-
9076
- name: Setup Pages
9177
uses: actions/configure-pages@v5
92-
9378
- name: Upload artifact
94-
uses: actions/upload-pages-artifact@v3
79+
uses: actions/upload-pages-artifact@v4
9580
with:
9681
path: './docs/dist'
9782

@@ -105,4 +90,4 @@ jobs:
10590
steps:
10691
- name: Deploy to GitHub Pages
10792
id: deployment
108-
uses: actions/deploy-pages@v4
93+
uses: actions/deploy-pages@v4

.github/workflows/push-dist.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Because this library needs to be built,
1+
# Because this library needs to be built,
22
# we can't easily point package.json files at the git repo for easy cross-repo testing.
33
#
44
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
@@ -24,16 +24,11 @@ jobs:
2424
- uses: pnpm/action-setup@v4
2525
- uses: actions/setup-node@v4
2626
with:
27-
node-version: 18
28-
cache: 'pnpm'
27+
node-version: 22
28+
cache: pnpm
2929
- name: Install Dependencies
3030
run: pnpm install --frozen-lockfile
31-
32-
- run: pnpm build
33-
- run: pnpm i -f # re-sync injected deps
34-
3531
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
3632
with:
3733
branch: dist
3834
token: ${{ secrets.GITHUB_TOKEN }}
39-
working-directory: 'ember-power-calendar'

.gitignore

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
# See https://help.github.com/ignore-files/ for more about ignoring files.
1+
# compiled output
2+
dist/
3+
dist-tests/
4+
declarations/
25

3-
# dependencies
4-
node_modules/
6+
# from scenarios
7+
tmp/
8+
config/optional-features.json
9+
ember-cli-build.cjs
510

6-
# misc
7-
.env*
8-
.pnp*
9-
.pnpm-debug.log
10-
.sass-cache
11-
.eslintcache
12-
coverage/
13-
npm-debug.log*
14-
yarn-error.log
11+
# npm/pnpm/yarn pack output
12+
*.tgz
1513

16-
# ember-try
17-
/.node_modules.ember-try/
18-
/package.json.ember-try
19-
/package-lock.json.ember-try
20-
/yarn.lock.ember-try
21-
/pnpm-lock.ember-try.yaml
14+
# deps & caches
15+
node_modules/
16+
.eslintcache
17+
.prettiercache

.npmrc

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

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
4+
# compiled output
5+
/dist/
6+
/dist-*/
7+
/declarations/
8+
/src/vendor/
9+
10+
# misc
11+
/coverage/
12+
pnpm-lock.yaml
13+
config/ember-cli-update.json
14+
*.yaml
15+
*.yml
16+
*.md
17+
*.html
18+
CHANGELOG.md

.prettierrc.cjs

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
'use strict';
2-
3-
module.exports = {
1+
export default {
42
plugins: ['prettier-plugin-ember-template-tag'],
53
overrides: [
64
{

.template-lintrc.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
extends: 'recommended',
3+
checkHbsTemplateLiterals: false,
4+
};

0 commit comments

Comments
 (0)