-
-
Notifications
You must be signed in to change notification settings - Fork 111
test: migrate preact/utils to vitest #715
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
test: migrate preact/utils to vitest #715
Conversation
|
This also adds `preact/utils` to the pnpm workspace so it can be resolved properly via `@preact/signals-utils`.
fa11429
to
bcab425
Compare
@@ -1,6 +1,7 @@ | |||
packages: | |||
# all packages in direct subdirs of packages/ | |||
- "packages/*" | |||
- "packages/preact/utils" |
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 didn't actually need this in the end i think, because we're misusing sub-packages
we define preact/utils
as its own package, @preact/signals-utils
but within this repo, we import it as if its a sub-path, @preact/signals/utils
.
we don't actually publish this package afaict so this worked fine. but i wonder if we should update it to treat it as an actual package, i.e. change the imports and tsconfig refs to @preact/signals-utils
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'd prefer not to, we use this pattern in the main preact repo as well
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 will remove this change
it seems like signals/utils
having a package.json
doesn't make much sense, though. it should probably just be a subdir of signals. we don't expose it to pnpm
, so its dependencies don't get install afaik, and nothing resolves to it as everything accesses it by subdir instead.
one for another time though
7e86e6b
to
828fd83
Compare
ok it turns out we do need the in order for the tests in the utils package to resolve bare specifiers, the utils package itself needs to be picked up by pnpm. so it has to be in the workspace file. but i haven't touched the imports, etc. i've also downgraded vite in this PR which should fix the failing CI (vite 7 doesn't work in node 18) we should merge this one before the other PRs |
This also adds
preact/utils
to the pnpm workspace so it can beresolved properly via
@preact/signals-utils
.