Skip to content

Commit 80f7f01

Browse files
authored
Merge pull request #879 from tracked-tools/vite-addon-blueprint
Sync with vite based addon blueprint
2 parents c89f039 + 1763d23 commit 80f7f01

Some content is hidden

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

78 files changed

+3636
-7344
lines changed

.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: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,50 @@ concurrency:
1212
cancel-in-progress: true
1313

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

2020
steps:
2121
- uses: actions/checkout@v4
2222
- uses: pnpm/action-setup@v4
23-
- name: Install Node
24-
uses: actions/setup-node@v4
23+
- uses: actions/setup-node@v4
2524
with:
2625
node-version: 20
2726
cache: pnpm
2827

2928
- name: Install Dependencies
3029
run: pnpm install --frozen-lockfile
3130

32-
- name: Lint Addon
33-
run: pnpm run --filter=ember-async-data lint
31+
- name: Lint
32+
run: pnpm lint
3433

35-
- name: Lint Test App
36-
run: pnpm run --filter=test-app lint
34+
test:
35+
name: "Tests"
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 10
38+
outputs:
39+
matrix: ${{ steps.set-matrix.outputs.matrix }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: pnpm/action-setup@v4
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: 20
47+
cache: pnpm
48+
49+
- name: Install Dependencies
50+
run: pnpm install --frozen-lockfile
3751

3852
- name: Run Tests
39-
run: pnpm run test:ember
53+
run: pnpm test
54+
55+
# For the Try Scenarios
56+
- id: set-matrix
57+
run: |
58+
echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT
4059
4160
floating:
4261
name: "Floating Dependencies"
@@ -46,8 +65,7 @@ jobs:
4665
steps:
4766
- uses: actions/checkout@v4
4867
- uses: pnpm/action-setup@v4
49-
- name: Install Node
50-
uses: actions/setup-node@v4
68+
- uses: actions/setup-node@v4
5169
with:
5270
node-version: 20
5371
cache: pnpm
@@ -56,44 +74,37 @@ jobs:
5674
run: pnpm install --no-lockfile
5775

5876
- name: Run Tests
59-
run: pnpm test:ember
77+
run: pnpm test
6078

6179
try-scenarios:
62-
name: ${{ matrix.try-scenario }}
80+
name: ${{ matrix.name }}
6381
runs-on: ubuntu-latest
64-
needs: 'test'
82+
needs: "test"
6583
timeout-minutes: 10
66-
6784
strategy:
6885
fail-fast: false
69-
matrix:
70-
try-scenario:
71-
- ember-lts-4.8
72-
- ember-lts-4.12
73-
- ember-lts-5.4
74-
- ember-lts-5.8
75-
- ember-lts-5.12
76-
- ember-release
77-
- ember-beta
78-
- ember-canary
79-
- embroider-safe
80-
- embroider-optimized
86+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
8187

8288
steps:
8389
- uses: actions/checkout@v4
8490
- uses: pnpm/action-setup@v4
85-
- name: Install Node
86-
uses: actions/setup-node@v4
91+
- uses: actions/setup-node@v4
8792
with:
8893
node-version: 20
8994
cache: pnpm
9095

96+
- name: Apply Scenario
97+
run: |
98+
pnpm dlx @embroider/try apply ${{ matrix.name }}
99+
91100
- name: Install Dependencies
92-
run: pnpm install --frozen-lockfile
101+
run: pnpm install --no-lockfile
93102

94103
- name: Run Tests
95-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
96-
working-directory: test-app
104+
run: |
105+
pnpm test
106+
107+
env: ${{ matrix.env }}
97108

98109
tests_ts:
99110
name: "Type checking: TS ${{ matrix.ts-version }}"
@@ -113,8 +124,7 @@ jobs:
113124
steps:
114125
- uses: actions/checkout@v4
115126
- uses: pnpm/action-setup@v4
116-
- name: Install Node
117-
uses: actions/setup-node@v4
127+
- uses: actions/setup-node@v4
118128
with:
119129
node-version: 20
120130
cache: pnpm
@@ -123,10 +133,7 @@ jobs:
123133
run: pnpm install --frozen-lockfile
124134

125135
- run: pnpm add -D typescript@${{ matrix.ts-version }}
126-
working-directory: ember-async-data
127136

128137
- run: ./node_modules/.bin/tsc --version && ./node_modules/.bin/tsc --noEmit true --emitDeclarationOnly false
129-
working-directory: ember-async-data
130138

131139
- run: ./node_modules/.bin/tsc --noEmit true --emitDeclarationOnly false --project type-tests --rootDir "."
132-
working-directory: ember-async-data

.github/workflows/push-dist.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,21 @@ on:
1414
jobs:
1515
push-dist:
1616
name: Push dist
17+
permissions:
18+
contents: write
1719
runs-on: ubuntu-latest
1820
timeout-minutes: 10
1921

2022
steps:
2123
- uses: actions/checkout@v4
2224
- uses: pnpm/action-setup@v4
23-
- name: Install Node
24-
uses: actions/setup-node@v4
25+
- uses: actions/setup-node@v4
2526
with:
2627
node-version: 20
2728
cache: pnpm
28-
2929
- name: Install Dependencies
3030
run: pnpm install --frozen-lockfile
31-
3231
- uses: kategengler/[email protected]
3332
with:
3433
branch: dist
3534
token: ${{ secrets.GITHUB_TOKEN }}
36-
working-directory: 'ember-async-data'

.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.js
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

.prettierignore

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
# Prettier is also run from each package, so the ignores here
2-
# protect against files that may not be within a package
1+
# unconventional js
2+
/blueprints/*/files/
33

4-
# misc
5-
!.*
6-
.lint-todo/
4+
# compiled output
5+
/dist/
6+
/dist-*/
7+
/declarations/
78

8-
# ember-try
9-
/.node_modules.ember-try/
10-
/pnpm-lock.ember-try.yaml
9+
# misc
10+
/coverage/
11+
pnpm-lock.yaml
12+
config/ember-cli-update.json
13+
*.yaml
14+
*.yml
15+
*.md
16+
*.html

.prettierrc.cjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22

33
module.exports = {
44
plugins: ['prettier-plugin-ember-template-tag'],
5-
singleQuote: true,
5+
overrides: [
6+
{
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
8+
options: {
9+
singleQuote: true,
10+
templateSingleQuote: false,
11+
},
12+
},
13+
],
614
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
module.exports = {
44
extends: 'recommended',
5+
checkHbsTemplateLiterals: false,
56
};

0 commit comments

Comments
 (0)