-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
df00c0a
to
20fb294
Compare
f427af0
to
24fddc5
Compare
3acdb40
to
7cf3fb8
Compare
addon/types/custom-ember-debug.d.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer needed, due to using build in types
addon/types/dummy/index.d.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer needed, due to using build in types
addon/types/qunit/index.d.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer needed, due to using build in types
@@ -2,7 +2,7 @@ | |||
|
|||
const getChannelURL = require('ember-source-channel-url'); | |||
|
|||
module.exports = async function() { | |||
module.exports = async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new prettier settings (not changeable)
7cf3fb8
to
342b449
Compare
@@ -4,7 +4,6 @@ on: | |||
push: | |||
branches: | |||
- master | |||
- 'v*' |
There was a problem hiding this comment.
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
- run: pnpm lint | ||
|
||
test: | ||
timeout-minutes: 10 | ||
name: "Tests: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}" |
There was a problem hiding this comment.
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
@@ -108,16 +90,12 @@ jobs: | |||
- test-apps/base-tests | |||
ember-try-scenario: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
342b449
to
d5b3362
Compare
addon/.npmignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced by package.json#files
c582fbd
to
1fcb179
Compare
"types": "./declarations/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./__private__/types": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used by tests only. there were no import restrictions in the prior version of test-waiters.
1fcb179
to
f526251
Compare
@@ -1,4 +1,4 @@ | |||
import { PendingWaiterState, Waiter, WaiterName } from './types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using type imports is important for not shipping too much stuff to the runtime (especially stuff that doesn't exist (types-only imports don't exist at runtime, and would error otherwise))
"start:addon": "pnpm --filter @ember/test-waiters start -- --no-watch.clearScreen", | ||
"start:test-app": "pnpm --filter test-app start", | ||
"test": "pnpm --filter '*' test" | ||
}, | ||
"devDependencies": { | ||
"@glint/core": "^1.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of vscode reasons, some LSP/Tooling dependencies need to be added to the root package.json.
No CLI tool cares that these are here
f526251
to
0a413e5
Compare
…test-waiters, and this relationship requires ember-auto-import and test-helpers v3 has auto-import
@@ -19,47 +18,41 @@ jobs: | |||
- uses: actions/checkout@v4 | |||
- uses: wyvox/action-setup-pnpm@v3 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
@@ -108,16 +90,12 @@ jobs: | |||
- test-apps/base-tests | |||
ember-try-scenario: |
There was a problem hiding this comment.
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?
"files": [ | ||
"declarations", | ||
"dist", | ||
"src", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NullVoxPopuli why would we need src to be published?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so go-to-definition can go to source instead of declarations (requires declaration maps, iirc)
"globals": "^15.12.0", | ||
"loader.js": "^4.7.0", | ||
"execa": "^9.5.1", | ||
"fix-bad-declaration-output": "^1.1.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this actually needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a default thing I use in v2 addons, because the /// <reference
thing with peers is too annoying to fix otherwise if it comes up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so it's just in case here rather actually needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk. It is used in the rollup config.
It's just not a problem i want to run in to, since TS is very against properly working peers - there isn't a better path forward:(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for explanation! IMO it's ok to keep it as long as any future reader can easily understand/use it which should be the case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, in the rollup config I link to some discussion on the TS repo about peer-provided types
@@ -128,7 +128,7 @@ class NoopTestWaiter implements TestWaiter { | |||
/** | |||
* Builds and returns a test waiter. The type of the | |||
* returned waiter is dependent on whether the app or | |||
* addon is in `isDevopingApp()` mode or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may like to Dev Oping, more like Dev Oopsing lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
@@ -13,7 +13,7 @@ import { module, test } from 'qunit'; | |||
|
|||
// @ts-ignore | |||
import { Promise } from 'rsvp'; | |||
import Token from '@ember/test-waiters/token'; | |||
import Token from '@ember/test-waiters/__private__/token'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this extra /__private__/
works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is not supposed to be true and if it's true it's a bug in ember-auto-import. We try to maintain compatibility so that all v2 addons are always available to every package, in keeping with the classic behavior. |
so far, in the auto-import test suite: I'm unable to create a rero 🤔 https://github.com/embroider-build/ember-auto-import/pull/650/files maybe everything is fine then! |
removed the second bullet -- the only requirement for v1 addons is that they have ember-auto-import -- as long as they do, folks should be able to use the new/upcoming version of |
Applies https://github.com/embroider-build/addon-blueprint
+
some updates from ember-cli 6.1 (better eslint)
Marked as breaking because
@ember/test-waiters
Error: @ember/test-helpers needs to depend on ember-auto-import in order to use @ember/test-waiters
@ember/test-helpers
v3 has ember-auto-import@ember/test-helpers
v2 does not have ember-auto-import@ember/test-waiters
Comparing with v3: