Skip to content

Commit 262093f

Browse files
authored
Convert to new v2 addon blueprint (#1041)
* Convert to new v2 addon blueprint & keep docs * Add packageManager * Fix lint errors * Run format * Remove ember-load-initializers from addon * Sync docs.yml * Add addon build * Run only docs lint in docs.yml * Fix docs.yml * Remove vendor files from src * Add rule to ignore src/vendor * Use modern api for build css files * Minor fixes * Remove unnecessary casting * Use types import with .ts to keep sync with tests... * Update packages to latest * Update docs v6.7.0...v6.9.1 * Run format * Keep app default tsconfig * Fix lint
1 parent 1cc3fb7 commit 262093f

File tree

165 files changed

+4571
-6565
lines changed

Some content is hidden

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

165 files changed

+4571
-6565
lines changed

.env.development

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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
9+
# VITE_SHADOW_DOM_BUILD=true # Activate this option to run the demo app and all tests within the Shadow DOM.

.github/workflows/ci.yml

Lines changed: 34 additions & 81 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,125 +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-
- run: pnpm build
31-
- run: pnpm i -f # re-sync injected deps
32-
3329
- name: Lint
34-
run: pnpm --filter ember-basic-dropdown --filter test-app lint
30+
run: pnpm lint
3531

3632
test:
3733
name: "Tests"
3834
runs-on: ubuntu-latest
39-
needs: lint
35+
timeout-minutes: 10
36+
outputs:
37+
matrix: ${{ steps.set-matrix.outputs.matrix }}
4038

4139
steps:
4240
- uses: actions/checkout@v4
4341
- uses: pnpm/action-setup@v4
44-
45-
- name: Install Node
46-
uses: actions/setup-node@v4
42+
- uses: actions/setup-node@v4
4743
with:
48-
node-version: 20.x
44+
node-version: 22
4945
cache: pnpm
50-
5146
- name: Install Dependencies
5247
run: pnpm install --frozen-lockfile
53-
54-
- run: pnpm build
55-
- run: pnpm i -f # re-sync injected deps
56-
5748
- name: Run Tests
58-
run: pnpm --filter test-app test:ember
59-
60-
test-shadow-dom:
61-
name: "Tests Shadow dom"
62-
runs-on: ubuntu-latest
63-
needs: lint
64-
65-
steps:
66-
- uses: actions/checkout@v4
67-
- uses: pnpm/action-setup@v4
68-
69-
- name: Install Node
70-
uses: actions/setup-node@v4
71-
with:
72-
node-version: 20.x
73-
cache: 'pnpm'
74-
75-
- name: Install Dependencies
76-
run: pnpm install --frozen-lockfile
77-
78-
- run: pnpm build
79-
- run: pnpm i -f # re-sync injected deps
80-
81-
- name: Run Tests
82-
run: pnpm --filter test-app test:ember-shadow-dom
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+
8355
8456
floating:
8557
name: "Floating Dependencies"
8658
runs-on: ubuntu-latest
87-
needs: lint
59+
timeout-minutes: 10
8860

8961
steps:
9062
- uses: actions/checkout@v4
9163
- uses: pnpm/action-setup@v4
9264
- uses: actions/setup-node@v4
9365
with:
94-
node-version: 20.x
66+
node-version: 22
9567
cache: pnpm
96-
9768
- name: Install Dependencies
98-
run: pnpm install --frozen-lockfile
99-
100-
- run: pnpm build
101-
- run: pnpm i -f # re-sync injected deps
102-
69+
run: pnpm install --no-lockfile
10370
- name: Run Tests
104-
run: pnpm --filter test-app test:ember
71+
run: pnpm test
10572

10673
try-scenarios:
107-
name: ${{ matrix.try-scenario }}
74+
name: ${{ matrix.name }}
10875
runs-on: ubuntu-latest
109-
continue-on-error: true
110-
needs: test
111-
76+
needs: "test"
77+
timeout-minutes: 10
11278
strategy:
11379
fail-fast: false
114-
matrix:
115-
try-scenario:
116-
- ember-lts-4.12
117-
- ember-lts-5.4
118-
- ember-lts-5.8
119-
- ember-lts-5.12
120-
- ember-lts-6.4
121-
- ember-lts-6.8
122-
- ember-release
123-
- ember-beta
124-
- ember-canary
125-
- embroider-safe
126-
- embroider-optimized
80+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
12781

12882
steps:
12983
- uses: actions/checkout@v4
13084
- uses: pnpm/action-setup@v4
131-
132-
- name: Install Node
133-
uses: actions/setup-node@v4
85+
- uses: actions/setup-node@v4
13486
with:
135-
node-version: 20.x
87+
node-version: 22
13688
cache: pnpm
137-
89+
- name: Apply Scenario
90+
run: |
91+
pnpm dlx @embroider/try apply ${{ matrix.name }}
92+
13893
- name: Install Dependencies
139-
run: pnpm install --frozen-lockfile
140-
- run: pnpm build
141-
- run: pnpm i -f # re-sync injected deps
142-
94+
run: pnpm install --no-lockfile
14395
- name: Run Tests
144-
env:
145-
EMBER_TRY_SCENARIO: ${{ matrix.try-scenario }}
146-
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: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,21 @@ permissions:
1515

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: 20.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,19 +41,14 @@ 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: 20.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
6053
run: pnpm --filter docs test:ember
6154

@@ -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: 20.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

.github/workflows/push-dist.yml

Lines changed: 3 additions & 5 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
@@ -22,15 +22,13 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: pnpm/action-setup@v4
25-
2625
- uses: actions/setup-node@v4
2726
with:
28-
node-version: 20
29-
cache: 'pnpm'
27+
node-version: 22
28+
cache: pnpm
3029
- name: Install Dependencies
3130
run: pnpm install --frozen-lockfile
3231
- uses: kategengler/[email protected]
3332
with:
3433
branch: dist
3534
token: ${{ secrets.GITHUB_TOKEN }}
36-
working-directory: 'ember-basic-dropdown'

.gitignore

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

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

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
12+
# npm/pnpm/yarn pack output
13+
*.tgz
1514

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
15+
# deps & caches
16+
node_modules/
17+
.eslintcache
18+
.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)