Skip to content

Commit 16fb759

Browse files
authored
adopt new v2 addon format (#323)
1 parent 3103322 commit 16fb759

Some content is hidden

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

83 files changed

+4924
-7703
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: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,88 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
lint:
17+
name: "Lints"
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 10
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: pnpm/action-setup@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version-file: package.json
27+
cache: pnpm
28+
- name: Install Dependencies
29+
run: pnpm install --frozen-lockfile
30+
- name: Lint
31+
run: pnpm lint
32+
1633
test:
1734
name: "Tests"
1835
runs-on: ubuntu-latest
36+
timeout-minutes: 10
37+
outputs:
38+
matrix: ${{ steps.set-matrix.outputs.matrix }}
1939

2040
steps:
2141
- uses: actions/checkout@v4
22-
- uses: wyvox/action-setup-pnpm@v3
42+
- uses: pnpm/action-setup@v4
43+
- uses: actions/setup-node@v4
2344
with:
2445
node-version: 18
25-
- name: Lint
26-
run: pnpm lint
46+
cache: pnpm
47+
- name: Install Dependencies
48+
run: pnpm install --frozen-lockfile
2749
- name: Run Tests
2850
run: pnpm test
51+
# For the Try Scenarios
52+
- id: set-matrix
53+
run: |
54+
echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT
55+
2956
3057
floating:
3158
name: "Floating Dependencies"
3259
runs-on: ubuntu-latest
60+
timeout-minutes: 10
3361

3462
steps:
3563
- uses: actions/checkout@v4
36-
- uses: wyvox/action-setup-pnpm@v3
64+
- uses: pnpm/action-setup@v4
65+
- uses: actions/setup-node@v4
3766
with:
38-
node-version: 18
39-
args: "--no-lockfile"
67+
node-version-file: package.json
68+
cache: pnpm
69+
- name: Install Dependencies
70+
run: pnpm install --no-lockfile
4071
- name: Run Tests
4172
run: pnpm test
4273

4374
try-scenarios:
44-
name: ${{ matrix.try-scenario }}
75+
name: ${{ matrix.name }}
4576
runs-on: ubuntu-latest
4677
needs: "test"
47-
78+
timeout-minutes: 10
4879
strategy:
4980
fail-fast: false
50-
matrix:
51-
try-scenario:
52-
- ember-lts-3.28
53-
- ember-lts-4.4
54-
- ember-lts-4.8
55-
- ember-lts-4.12
56-
- ember-lts-5.12
57-
- ember-release
58-
- ember-beta
59-
- ember-canary
60-
- no-deprecations
61-
- ember-release-no-deprecations
62-
- embroider-safe
63-
- embroider-optimized
64-
- ember-modifier-3.2.7
81+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
6582

6683
steps:
6784
- uses: actions/checkout@v4
68-
- uses: wyvox/action-setup-pnpm@v3
85+
- uses: pnpm/action-setup@v4
86+
- uses: actions/setup-node@v4
6987
with:
70-
node-version: 18
88+
node-version-file: package.json
89+
cache: pnpm
90+
- name: Apply Scenario
91+
run: |
92+
pnpm dlx @embroider/try apply ${{ matrix.name }}
93+
94+
- name: Install Dependencies
95+
run: pnpm install --no-lockfile
7196
- name: Run Tests
72-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
73-
working-directory: test-app
97+
run: |
98+
pnpm test
99+
100+
env: ${{ matrix.env }}

.github/workflows/push-dist.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
permissions:
18+
contents: write
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: pnpm/action-setup@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version-file: package.json
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 }}

.gitignore

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +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/
5-
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
6+
# from scenarios
7+
tmp/
8+
config/optional-features.json
9+
ember-cli-build.js
1510

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

14+
# deps & caches
15+
node_modules/
16+
.eslintcache
17+
.prettiercache

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
auto-install-peers=false
2+
dedupe-peer-dependents=true
3+
resolution-mode=highest
4+
strict-peer-dependents=true

ember-style-modifier/.prettierignore renamed to .prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33

44
# compiled output
55
/dist/
6+
/dist-*/
67
/declarations/
78

89
# misc
910
/coverage/
11+
pnpm-lock.yaml
12+
config/ember-cli-update.json
13+
*.yaml
14+
*.yml
15+
*.md
16+
*.html

.prettierrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
module.exports = {
44
plugins: ['prettier-plugin-ember-template-tag'],
5-
templateSingleQuote: false,
65
overrides: [
76
{
8-
files: '*.{js,ts,gjs,gts}',
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
98
options: {
109
singleQuote: true,
10+
templateSingleQuote: false,
1111
},
1212
},
1313
],

ember-style-modifier/.template-lintrc.cjs renamed to .template-lintrc.cjs

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)