Closed cre8 closed 5 months ago
Attention: 4 lines
in your changes are missing coverage. Please review.
Comparison is base (
165de35
) 85.50% compared to head (a4d41f5
) 68.18%.
Files | Patch % | Lines |
---|---|---|
packages/core-types/src/plugin.schema.ts | 0.00% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Btw it's not only a webpack problem, but also for esbuild and babel. For babel there is a plugin that can deal with plugin-syntax-import-assertions
, but the other bundlers are lacking behind.
So should we remove the json files from this PR and merge it when it fits for the major version?
So should we remove the json files from this PR and merge it when it fits for the major version?
Yes, please remove them.
We don't have an ability to mark them as deprecated, but if anyone depends on them they'll see a broken build after upgrading to the new major version and they'll be able to roll back their upgrade.
Done
@mirceanis I am not quite sure if import schema from '@veramo/core-types/build/plugin.schema'
is the correct way to go. It seems better to export the plugin.schema.ts
from the index.ts
file so the import can be shortened. But for this I think we need also export the schema as a const and not a default.
I agree. Please post a PR if you're already testing this out
I agree. Please post a PR if you're already testing this out
@cre8 nevermind, I've managed to create a PR (#1327) as it was blocking another task I'm working on. Please take a look.
What issue is this PR fixing
Fixes #1254
What is being changed
As described in the issue I replaced the
assert { type: 'json' }
with a classic typescript import. This allows other bundlers like webpack to deal with this without throwing an error since the assert command is not fully supported by typescript yetI also stored the plugin.json file as non formatted, saving around 50% of the size.
There are still some assert imports in the
ld-default-context
package, this can be handled in another issue since it has nothing to do with this task of generating the schema of a plugin.The
plugin.schema.ts
is generated in parallel to theplugin.schema.json
so it does not break other project that are depending on them.Quality
Check all that apply:
pnpm i
,pnpm build
,pnpm test
,pnpm test:browser
locally.