I was tired of writing this in my new glint projects with SFC support:
import eq from 'ember-truth-helpers/helpers/equal';
import not from 'ember-truth-helpers/helpers/not';
...
I wanted to write this instead:
import { eq, not } from 'ember-truth-helpers';
while at the same time, using truth helpers in classic hbs files (that are now powered by glint).
In order to do so. I did this:
Converted project to TS for types (fixes #163)
Re-exported helpers from the index
Added template registry
Tests continued to work as is 🥳
Added a modern-test-app
I wanted to keep the existing test app with its dependencies for backwards compatibility (ember v3)
I created the modern test app for glint related functionality
I converted the tests to gts, to test the new API (re-export from index) - part of CI now
I added a template/helpers.hbs to test the types from the registry
Unfortunately the type checks fail due to upstream problematics (I will report on glint repo)
When running those manually, at least the glint relevant functionality succeeds
I was updating dependencies along the way, when that become necessary (ie. CLI execution told me to update xyz), or I knew an update would solve some problems (ie. embroider deps). As these dependencies are devDeps, that seems fine.
Finally a readme for consumers how to use ember-truth-helpers with SFC or glint enabled projects.
There we are. Truth helpers with glint support. I tried to keep the PR reviewable on a commit-by-commit basis.
I was tired of writing this in my new glint projects with SFC support:
I wanted to write this instead:
while at the same time, using truth helpers in classic hbs files (that are now powered by glint).
In order to do so. I did this:
modern-test-app
gts
, to test the new API (re-export from index) - part of CI nowtemplate/helpers.hbs
to test the types from the registrydevDeps
, that seems fine.ember-truth-helpers
with SFC or glint enabled projects.There we are. Truth helpers with glint support. I tried to keep the PR reviewable on a commit-by-commit basis.