Skip to content

Commit a0ef113

Browse files
authored
Remove global config, convert FlashObject to native class, _destroyLater -> destroyMessage
1 parent 6b13c8a commit a0ef113

115 files changed

Lines changed: 13423 additions & 15212 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: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,92 @@ on:
88
pull_request: {}
99

1010
concurrency:
11-
group: ci-${{ github.head_ref || github.ref }}
12-
cancel-in-progress: true
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1313

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

1920
steps:
20-
- uses: actions/checkout@v3
21-
- uses: wyvox/action-setup-pnpm@v2
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
2224
with:
23-
node-version: 16
25+
node-version: 22
26+
cache: pnpm
27+
- name: Install Dependencies
28+
run: pnpm install --frozen-lockfile
2429
- name: Lint
2530
run: pnpm lint
31+
32+
test:
33+
name: "Tests"
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
outputs:
37+
matrix: ${{ steps.set-matrix.outputs.matrix }}
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: pnpm/action-setup@v4
42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version: 22
45+
cache: pnpm
46+
- name: Install Dependencies
47+
run: pnpm install --frozen-lockfile
2648
- name: Run Tests
2749
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+
2855
2956
floating:
3057
name: "Floating Dependencies"
3158
runs-on: ubuntu-latest
59+
timeout-minutes: 10
3260

3361
steps:
34-
- uses: actions/checkout@v3
35-
- uses: wyvox/action-setup-pnpm@v2
62+
- uses: actions/checkout@v4
63+
- uses: pnpm/action-setup@v4
64+
- uses: actions/setup-node@v4
3665
with:
37-
node-version: 16
66+
node-version: 22
67+
cache: pnpm
68+
- name: Install Dependencies
69+
run: pnpm install --no-lockfile
3870
- name: Run Tests
3971
run: pnpm test
4072

4173
try-scenarios:
42-
name: ${{ matrix.try-scenario }}
74+
name: ${{ matrix.name }}
4375
runs-on: ubuntu-latest
44-
needs: 'test'
45-
76+
needs: "test"
77+
timeout-minutes: 10
4678
strategy:
4779
fail-fast: false
48-
matrix:
49-
try-scenario:
50-
- ember-lts-3.28
51-
- ember-lts-4.12
52-
- ember-release
53-
- ember-beta
54-
- ember-canary
80+
matrix: ${{fromJson(needs.test.outputs.matrix)}}
5581

5682
steps:
57-
- uses: actions/checkout@v3
58-
- uses: wyvox/action-setup-pnpm@v2
83+
- uses: actions/checkout@v4
84+
- uses: pnpm/action-setup@v4
85+
- uses: actions/setup-node@v4
5986
with:
60-
node-version: 16
87+
node-version: 22
88+
cache: pnpm
89+
- name: Apply Scenario
90+
run: |
91+
pnpm dlx @embroider/try apply ${{ matrix.name }}
92+
93+
- name: Install Dependencies
94+
run: pnpm install --no-lockfile
6195
- name: Run Tests
62-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
63-
working-directory: test-app
96+
run: |
97+
pnpm test
98+
99+
env: ${{ matrix.env }}

.github/workflows/push-dist.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ on:
1414
jobs:
1515
push-dist:
1616
name: Push dist
17+
permissions:
18+
contents: write
1719
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
1822
steps:
19-
- uses: actions/checkout@v3
20-
- uses: wyvox/action-setup-pnpm@v3
23+
- uses: actions/checkout@v4
24+
- uses: pnpm/action-setup@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
cache: pnpm
29+
- name: Install Dependencies
30+
run: pnpm install --frozen-lockfile
2131
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
2232
with:
2333
branch: dist
2434
token: ${{ secrets.GITHUB_TOKEN }}
25-
working-directory: ember-cli-flash

.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

.npmignore

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

.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: 0 additions & 6 deletions
This file was deleted.

.prettierrc.mjs

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

.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+
};

.try.mjs

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// When building your addon for older Ember versions you need to have the required files
2+
const compatFiles = {
3+
'ember-cli-build.cjs': `const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4+
const { compatBuild } = require('@embroider/compat');
5+
module.exports = async function (defaults) {
6+
const { buildOnce } = await import('@embroider/vite');
7+
let app = new EmberApp(defaults);
8+
return compatBuild(app, buildOnce);
9+
};`,
10+
'config/optional-features.json': JSON.stringify({
11+
'application-template-wrapper': false,
12+
'default-async-observers': true,
13+
'jquery-integration': false,
14+
'template-only-glimmer-components': true,
15+
'no-implicit-route-model': true,
16+
}),
17+
};
18+
19+
const compatDeps = {
20+
'@embroider/compat': '^4.0.3',
21+
'ember-cli': '^5.12.0',
22+
'ember-auto-import': '^2.10.0',
23+
'@ember/optional-features': '^2.2.0',
24+
};
25+
26+
export default {
27+
scenarios: [
28+
{
29+
name: 'ember-lts-5.8',
30+
npm: {
31+
devDependencies: {
32+
'ember-source': '~5.8.0',
33+
...compatDeps,
34+
},
35+
},
36+
env: {
37+
ENABLE_COMPAT_BUILD: true,
38+
},
39+
files: compatFiles,
40+
},
41+
{
42+
name: 'ember-lts-5.12',
43+
npm: {
44+
devDependencies: {
45+
'ember-source': '~5.12.0',
46+
...compatDeps,
47+
},
48+
},
49+
env: {
50+
ENABLE_COMPAT_BUILD: true,
51+
},
52+
files: compatFiles,
53+
},
54+
{
55+
name: 'ember-lts-6.4',
56+
npm: {
57+
devDependencies: {
58+
'ember-source': 'npm:ember-source@~6.4.0',
59+
},
60+
},
61+
},
62+
{
63+
name: 'ember-latest',
64+
npm: {
65+
devDependencies: {
66+
'ember-source': 'npm:ember-source@latest',
67+
},
68+
},
69+
},
70+
{
71+
name: 'ember-beta',
72+
npm: {
73+
devDependencies: {
74+
'ember-source': 'npm:ember-source@beta',
75+
},
76+
},
77+
},
78+
{
79+
name: 'ember-alpha',
80+
npm: {
81+
devDependencies: {
82+
'ember-source': 'npm:ember-source@alpha',
83+
},
84+
},
85+
},
86+
],
87+
};

0 commit comments

Comments
 (0)