Skip to content

Commit 3a0fe06

Browse files
Merge pull request #89 from aklkv/feat/modernize
feat: modernize
2 parents 546efdb + d1ef8ec commit 3a0fe06

84 files changed

Lines changed: 5472 additions & 9468 deletions

Some content is hidden

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

.ember-cli

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

.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

.eslintignore

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

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 83 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,84 +7,131 @@ on:
77
- master
88
- 'v*'
99
pull_request: {}
10-
schedule:
11-
- cron: '0 3 * * *' # daily, at 3am
1210

1311
concurrency:
1412
group: ci-${{ github.head_ref || github.ref }}
1513
cancel-in-progress: true
1614

1715
jobs:
18-
test:
19-
name: "Tests"
16+
build:
17+
name: "Build"
2018
runs-on: ubuntu-latest
2119
timeout-minutes: 10
2220

2321
steps:
24-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2523
- uses: pnpm/action-setup@v4
24+
- uses: actions/setup-node@v4
2625
with:
27-
version: 9
28-
- name: Install Node
29-
uses: actions/setup-node@v3
26+
node-version-file: package.json
27+
cache: pnpm
28+
- name: Install Dependencies
29+
run: pnpm install --frozen-lockfile
30+
- name: Build
31+
run: pnpm build
32+
- name: Upload Build Artifact
33+
uses: actions/upload-artifact@v4
3034
with:
31-
node-version: 18
35+
name: addon-build
36+
path: |
37+
dist
38+
declarations
39+
40+
lint:
41+
name: "Lints"
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 10
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: pnpm/action-setup@v4
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version-file: package.json
3251
cache: pnpm
3352
- name: Install Dependencies
3453
run: pnpm install --frozen-lockfile
3554
- name: Lint
3655
run: pnpm lint
56+
57+
test:
58+
name: "Tests"
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 10
61+
outputs:
62+
matrix: ${{ steps.set-matrix.outputs.matrix }}
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: pnpm/action-setup@v4
67+
- uses: actions/setup-node@v4
68+
with:
69+
node-version-file: package.json
70+
cache: pnpm
71+
- name: Install Dependencies
72+
run: pnpm install --frozen-lockfile
3773
- name: Run Tests
38-
run: pnpm test:ember
74+
run: pnpm test
75+
# For the Try Scenarios
76+
- id: set-matrix
77+
run: |
78+
echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT
79+
3980
4081
floating:
4182
name: "Floating Dependencies"
4283
runs-on: ubuntu-latest
84+
needs: "build"
4385
timeout-minutes: 10
4486

4587
steps:
46-
- uses: actions/checkout@v3
88+
- uses: actions/checkout@v4
4789
- uses: pnpm/action-setup@v4
90+
- uses: actions/setup-node@v4
4891
with:
49-
version: 9
50-
- uses: actions/setup-node@v3
51-
with:
52-
node-version: 18
92+
node-version-file: package.json
5393
cache: pnpm
5494
- name: Install Dependencies
5595
run: pnpm install --no-lockfile
96+
- name: Download Build Artifact
97+
uses: actions/download-artifact@v4
98+
with:
99+
name: addon-build
100+
path: .
56101
- name: Run Tests
57-
run: pnpm test:ember
102+
run: pnpm test
58103

59104
try-scenarios:
60-
name: ${{ matrix.try-scenario }}
105+
name: ${{ matrix.name }}
61106
runs-on: ubuntu-latest
62-
needs: "test"
107+
needs:
108+
- build
109+
- test
63110
timeout-minutes: 10
64-
65111
strategy:
66112
fail-fast: false
67-
matrix:
68-
try-scenario:
69-
- ember-lts-4.12
70-
- ember-lts-5.4
71-
- ember-release
72-
- ember-beta
73-
- ember-canary
74-
- embroider-safe
75-
- embroider-optimized
113+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
76114

77115
steps:
78-
- uses: actions/checkout@v3
116+
- uses: actions/checkout@v4
79117
- uses: pnpm/action-setup@v4
118+
- uses: actions/setup-node@v4
80119
with:
81-
version: 9
82-
- name: Install Node
83-
uses: actions/setup-node@v3
84-
with:
85-
node-version: 18
120+
node-version-file: package.json
86121
cache: pnpm
122+
- name: Apply Scenario
123+
run: |
124+
pnpm dlx @embroider/try apply ${{ matrix.name }}
125+
87126
- name: Install Dependencies
88-
run: pnpm install --frozen-lockfile
127+
run: pnpm install --no-lockfile
128+
- name: Download Build Artifact
129+
uses: actions/download-artifact@v4
130+
with:
131+
name: addon-build
132+
path: .
89133
- name: Run Tests
90-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
134+
run: |
135+
pnpm test
136+
137+
env: ${{ matrix.env }}

.github/workflows/push-dist.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
- name: Build
32+
run: pnpm build
33+
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
34+
with:
35+
branch: dist
36+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# compiled output
2-
/dist/
3-
/declarations/
2+
dist/
3+
dist-tests/
4+
declarations/
45

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

8-
# misc
9-
/.env*
10-
/.pnp*
11-
/.eslintcache
12-
/coverage/
13-
/npm-debug.log*
14-
/testem.log
15-
/yarn-error.log
11+
# npm/pnpm/yarn pack output
12+
*.tgz
1613

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

24-
# broccoli-debug
25-
/DEBUG/
19+
# potentially containing secrets
20+
*.local

.npmignore

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

.prettierignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33

44
# compiled output
55
/dist/
6+
/dist-*/
7+
/declarations/
68

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

0 commit comments

Comments
 (0)