Copy the say-controller type declarations from the editor in node_modules as we rely on those types for the public API but do not want to require consuming apps to install them themselves. This avoids type errors when using embeddable in a TS app with "skipLibChecks": false.
node_modules/@lblod/embeddable-say-editor/types/main.d.ts:68:24 - error TS2307: Cannot find module '@lblod/ember-rdfa-editor/core/say-controller' or its corresponding type declarations.
controller: import("@lblod/ember-rdfa-editor/core/say-controller").default;
Adds an angular test-app to make testing the types easier. There's also a docker-based automated test, as the only way to get an effective test is to have a repo that is not part of the pnpm workspace.
I did not yet add a woodpecker step to run these tests, which is something we should definitely do. I intend to add a small script to allow for the angular app to be run in the workspace as well as in docker, but that will not be in this PR.
To test locally, the easiest is to copy the test-angular repo outside of the workspace, run pnpm i and pnpm start in that dir. You should see the Angular build with a type error for missing types. If you then pnpm pack this PR (in the embeddable-say-editor dir), then pnpm i the resulting file in the angular app, you should then see no errors on pnpm start.
Challenges/uncertainties
Difficulties with how pnpm workspaces work and how we're doing something that the ecosystem doesn't seem to like (publishing packaged code rather than depending on other packages).
Checks PR readiness
[ ] UI: works on smaller screen sizes
[ ] UI: feedback for any loading/error states
[ ] Check cancel/go-back flows
[ ] Check database state correct when deleting/updating (especially regarding relationships)
Overview
Copy the say-controller type declarations from the editor in node_modules as we rely on those types for the public API but do not want to require consuming apps to install them themselves. This avoids type errors when using embeddable in a TS app with
"skipLibChecks": false
.Adds an angular test-app to make testing the types easier. There's also a docker-based automated test, as the only way to get an effective test is to have a repo that is not part of the pnpm workspace.
I did not yet add a woodpecker step to run these tests, which is something we should definitely do. I intend to add a small script to allow for the angular app to be run in the workspace as well as in docker, but that will not be in this PR.
connected issues and PRs:
Jira ticket: https://binnenland.atlassian.net/browse/GN-5071
Setup
N/A
How to test/reproduce
To test locally, the easiest is to copy the test-angular repo outside of the workspace, run
pnpm i
andpnpm start
in that dir. You should see the Angular build with a type error for missing types. If you thenpnpm pack
this PR (in the embeddable-say-editor dir), thenpnpm i
the resulting file in the angular app, you should then see no errors onpnpm start
.Challenges/uncertainties
Difficulties with how pnpm workspaces work and how we're doing something that the ecosystem doesn't seem to like (publishing packaged code rather than depending on other packages).
Checks PR readiness