Skip to content

Conversation

@stee-re
Copy link

@stee-re stee-re commented Dec 4, 2025

Small PR which removes the fetching of nsd files bundled in open-scd directly, intead using the nsds bundled in scl-lib. This means, no more fetches during bootstrapping to load the nsds.

Instead of delivering one large PR with an overwhelming number of changes, I opted for smaller bite sized PR's to make the review process less painful

Because the rootDir is everything and we're including .ts files, this catches the *.d.ts files too. So this tweak excludes those to reduce errors about files being overwritten.
scl-lib bundles all nsd files (as strings) which removes any need to fetch these files during bootstrapping. Also insures they'll never been loaded multiple times.
@stee-re stee-re changed the title Feat switch to scl lib for loading nsds Feat switch to scl-lib for loading nsds Dec 4, 2025
@stee-re stee-re force-pushed the feat_switch-to_scl-lib_for-loading-nsds branch from 8518a46 to 7242256 Compare December 4, 2025 07:17
@stee-re
Copy link
Author

stee-re commented Dec 4, 2025

Integration Test issue

An integration test (snapshot comparison) is failing. The test uploads an nsd file and checks it was loaded. Then compares a snapshot of the Settings dialog state. As far as I can understand, when an nsd is uploaded, the list-item should NOT be disabled.

I have the feeling the snapshot is holding the wrong state. Its indicating all nsd list items should be disabled. But when an nsd is uploaded (and is valid), shouldn't the appropriate list item be enabled? Is it possible, performance improvements (brought by using scl-lib's resources instead of multiple await-fetches) and changed the timing enough that we're now seeing the correct state where as before we were not?

Basically I need a second set of eyes to tell me if I'm missing something staring me right in the face, or confirm the snapshot was wrong and the fix is to update the snapshot for this test.

@stee-re stee-re force-pushed the feat_switch-to_scl-lib_for-loading-nsds branch from 7242256 to 13b8573 Compare December 5, 2025 07:06
Needed to upgrad to typsecript v5 because oscd-api (and others) require nodeResolution="bundler" which is only supported in TS v5+.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant