Skip to content

Commit d5b3362

Browse files
committed
Convert to V2 Addon
1 parent f6caf3c commit d5b3362

37 files changed

+1681
-2535
lines changed

.github/workflows/ci-build.yml

+4-26
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- 'v*'
87
pull_request:
98
workflow_dispatch:
109
schedule:
@@ -19,47 +18,30 @@ jobs:
1918
- uses: actions/checkout@v4
2019
- uses: wyvox/action-setup-pnpm@v3
2120
# type checking requires build
22-
- run: pnpm prepack
23-
working-directory: addon
21+
- run: pnpm build
2422
- run: pnpm lint
2523

2624
test:
2725
timeout-minutes: 10
28-
name: "Tests: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
26+
name: "Tests"
2927
runs-on: ubuntu-latest
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
EMBROIDER:
34-
- '' # classic
35-
- 'true'
3628

3729
steps:
3830
- uses: actions/checkout@v4
3931
- uses: wyvox/action-setup-pnpm@v3
4032
- run: pnpm test:ember
4133
working-directory: test-apps/base-tests
42-
env:
43-
EMBROIDER: ${{ matrix.EMBROIDER }}
4434

4535
floating-dependencies:
4636
timeout-minutes: 10
47-
name: "Floating Dependencies: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
37+
name: "Floating Dependencies"
4838
runs-on: ubuntu-latest
49-
strategy:
50-
fail-fast: false
51-
matrix:
52-
EMBROIDER:
53-
- '' # classic
54-
- 'true'
5539

5640
steps:
5741
- uses: actions/checkout@v4
5842
- uses: wyvox/action-setup-pnpm@v3
5943
- run: pnpm test:ember
6044
working-directory: test-apps/base-tests
61-
env:
62-
EMBROIDER: ${{ matrix.EMBROIDER }}
6345

6446
typecheck:
6547
name: '${{ matrix.typescript-scenario }}'
@@ -108,16 +90,12 @@ jobs:
10890
- test-apps/base-tests
10991
ember-try-scenario:
11092
- ember-lts-3.16
111-
- ember-lts-3.20
112-
- ember-lts-3.24
11393
- ember-lts-3.28
11494
- ember-lts-4.12
115-
- ember-lts-5.4
95+
- ember-lts-5.12
11696
- ember-release
11797
- ember-beta
11898
- ember-canary
119-
- 3.x-embroider-safe
120-
- 3.x-embroider-optimized
12199

122100
steps:
123101
- uses: actions/checkout@v4

addon/.ember-cli

-9
This file was deleted.

addon/.eslintrc.cjs

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
'use strict';
2+
3+
module.exports = {
4+
root: true,
5+
parser: '@typescript-eslint/parser',
6+
parserOptions: {
7+
ecmaVersion: 2024,
8+
sourceType: 'module',
9+
},
10+
plugins: ['ember', 'prettier', '@typescript-eslint'],
11+
extends: [
12+
'eslint:recommended',
13+
'plugin:ember/recommended',
14+
'prettier',
15+
'plugin:@typescript-eslint/eslint-recommended',
16+
],
17+
env: {
18+
browser: true,
19+
node: false,
20+
},
21+
rules: {
22+
'prettier/prettier': 'error',
23+
'no-unused-vars': 'off',
24+
'@typescript-eslint/no-unused-vars': 'error',
25+
'prefer-const': 'off',
26+
},
27+
overrides: [
28+
// node files
29+
{
30+
files: ['*.cjs'],
31+
parserOptions: {
32+
sourceType: 'script',
33+
ecmaVersion: 2022,
34+
},
35+
env: {
36+
browser: false,
37+
node: true,
38+
},
39+
plugins: ['n'],
40+
extends: ['plugin:n/recommended'],
41+
},
42+
],
43+
};

addon/.gitignore

+3-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
1-
# See https://help.github.com/ignore-files/ for more about ignoring files.
2-
3-
# compiled output
1+
/README.md
2+
/LICENSE.md
43
/dist/
5-
/tmp/
6-
7-
# dependencies
8-
/bower_components/
9-
/node_modules/
10-
11-
# misc
12-
/.env*
13-
/.pnp*
14-
/.sass-cache
15-
/connect.lock
16-
/coverage/
17-
/libpeerconnection.log
18-
/npm-debug.log*
19-
/testem.log
20-
/yarn-error.log
21-
22-
# ember-try
23-
/.node_modules.ember-try/
24-
/bower.json.ember-try
25-
/package.json.ember-try
26-
/addon/**/*.js
27-
28-
types/*.d.ts
29-
*.d.ts
30-
!/types/**/*.d.ts
4+
declarations/
315
*.tgz

addon/.npmignore

-41
This file was deleted.

addon/.prettierignore

+4-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
1-
# unconventional js
2-
/blueprints/*/files/
3-
/vendor/
4-
5-
# compiled output
6-
/dist/
7-
/tmp/
8-
9-
# dependencies
10-
/bower_components/
11-
/node_modules/
12-
13-
# misc
14-
/coverage/
15-
!.*
16-
.eslintcache
17-
18-
# ember-try
19-
/.node_modules.ember-try/
20-
/bower.json.ember-try
21-
/package.json.ember-try
22-
23-
addon/**/*.js
24-
**/*.d.ts
1+
dist/
2+
declarations/
3+
node_modules/
254
*.md
26-
*.html
5+
.eslintcache

addon/.watchmanconfig

-3
This file was deleted.

addon/RELEASE.md

-62
This file was deleted.

addon/addon-main.cjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
const { addonV1Shim } = require('@embroider/addon-shim');
4+
5+
module.exports = addonV1Shim(__dirname);

addon/babel.config.cjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
module.exports = {
4+
plugins: [
5+
['@babel/plugin-transform-typescript', { allowDeclareFields: true }],
6+
['module:decorator-transforms', { runtime: { import: 'decorator-transforms/runtime' } }],
7+
],
8+
};

addon/ember-cli-build.js

-24
This file was deleted.

addon/eslint.config.mjs

-8
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,5 @@ export default ts.config(
156156
...globals.node,
157157
},
158158
},
159-
},
160-
{
161-
// Remove this after v2
162-
rules: {
163-
'no-unused-vars': 'off',
164-
'no-redeclare': 'off',
165-
'no-undef': 'off',
166-
},
167159
}
168160
);

addon/index.js

-5
This file was deleted.

0 commit comments

Comments
 (0)