Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to V2 Addon, drop support for ember-source < v4 #476

Merged
merged 6 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- 'v*'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're not releasing on tag-pushes as we have a mass migration to release-plan which tags as a part of releasing, rather than releasing because of a tag

pull_request:
workflow_dispatch:
schedule:
Expand All @@ -19,47 +18,41 @@ jobs:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not sync up with blueprint to use pnpm/action-setup and actions/setup-node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less to think about, tbh.
also also back when I made action-setup-pnpm, both setup-node and pnpm/action-setup did not infer either of their versions from the correct places.
Today the difference is (per job) 1 line vs ~ 4, I think, not too bad

# type checking requires build
- run: pnpm prepack
working-directory: addon
- run: pnpm build
- run: pnpm lint

test:
timeout-minutes: 10
name: "Tests: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no longer any build behavior, so we aren't testing embroider and classic in a matrix -- we expect that embroider handles any behaviors used by this library

name: "Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
EMBROIDER:
- '' # classic
- 'true'

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm test:ember
working-directory: test-apps/base-tests
env:
EMBROIDER: ${{ matrix.EMBROIDER }}

test_ember-fetch:
timeout-minutes: 10
name: "Tests (ember-fetch @ v8)"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm test:ember
working-directory: test-apps/ember-fetch-v8

floating-dependencies:
timeout-minutes: 10
name: "Floating Dependencies: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
name: "Floating Dependencies"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
EMBROIDER:
- '' # classic
- 'true'

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm test:ember
working-directory: test-apps/base-tests
env:
EMBROIDER: ${{ matrix.EMBROIDER }}

typecheck:
name: '${{ matrix.typescript-scenario }}'
Expand Down Expand Up @@ -107,17 +100,12 @@ jobs:
app:
- test-apps/base-tests
ember-try-scenario:
Copy link
Contributor Author

@NullVoxPopuli NullVoxPopuli Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to cut down on CI noise, this is now just testing the ranges of support,

3.16 - minimum 4.0 minimum
x.latest - last LTS for a major, X
the 3 variable embers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NullVoxPopuli looks like some kind of mistake as now it only has 4.0, 4.12 and 5.12, no more 3.16 and no 3.28?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is out of date actually -- we cannot support ember < v4

- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-4.0
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.12
- ember-release
- ember-beta
- ember-canary
- 3.x-embroider-safe
- 3.x-embroider-optimized

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ This addon implements the design specified in [RFC 581](https://github.com/ember

## Compatibility

- Ember.js v2.18 or above
- Ember CLI v2.13 or above
- `ember-auto-import` or embroider
- `ember-source` v4 or above
- `@ember/test-helpers` v3 or above
- `ember-qunit` v7 or above

## Installation

Expand Down
9 changes: 0 additions & 9 deletions addon/.ember-cli

This file was deleted.

32 changes: 3 additions & 29 deletions addon/.gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/README.md
/LICENSE.md
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/addon/**/*.js

types/*.d.ts
*.d.ts
!/types/**/*.d.ts
declarations/
*.tgz
41 changes: 0 additions & 41 deletions addon/.npmignore

This file was deleted.

29 changes: 4 additions & 25 deletions addon/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

addon/**/*.js
**/*.d.ts
dist/
declarations/
node_modules/
*.md
*.html
.eslintcache
3 changes: 0 additions & 3 deletions addon/.watchmanconfig

This file was deleted.

62 changes: 0 additions & 62 deletions addon/RELEASE.md

This file was deleted.

5 changes: 5 additions & 0 deletions addon/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

const { addonV1Shim } = require('@embroider/addon-shim');

module.exports = addonV1Shim(__dirname);
8 changes: 8 additions & 0 deletions addon/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
plugins: [
['@babel/plugin-transform-typescript', { allowDeclareFields: true }],
['module:decorator-transforms', { runtime: { import: 'decorator-transforms/runtime' } }],
],
};
24 changes: 0 additions & 24 deletions addon/ember-cli-build.js

This file was deleted.

20 changes: 2 additions & 18 deletions addon/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ const parserOptions = {
js: {
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
requireConfigFile: false,
babelOptions: {
plugins: [['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }]],
},
},
ts: {
projectService: true,
Expand All @@ -53,7 +49,7 @@ export default ts.config(
* https://eslint.org/docs/latest/use/configure/ignore
*/
{
ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
},
/**
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
Expand Down Expand Up @@ -84,11 +80,7 @@ export default ts.config(
parser: ember.parser,
parserOptions: parserOptions.esm.ts,
},
extends: [
// Disabled until we're v2
// ...ts.configs.recommendedTypeChecked,
ember.configs.gts,
],
extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
rules: {
'ember/no-classic-classes': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
Expand Down Expand Up @@ -156,13 +148,5 @@ export default ts.config(
...globals.node,
},
},
},
{
// Remove this after v2
rules: {
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-undef': 'off',
},
}
);
5 changes: 0 additions & 5 deletions addon/index.js

This file was deleted.

Loading
Loading