-
Notifications
You must be signed in to change notification settings - Fork 14
feat: remove scalprum frontend support #182
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
base: main
Are you sure you want to change the base?
Changes from all commits
f40fdb4
45eb8a2
e652c51
1bf0495
6020721
1b29437
cb2492d
279c196
f7f74b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's drop any 'scaprum' related assertions here as well. |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,18 +49,10 @@ export async function command(opts: OptionValues): Promise<void> { | |
| ]; | ||
| } else if (role === 'frontend-plugin' || role === 'frontend-plugin-module') { | ||
| targetPath = await frontend(roleInfo, opts); | ||
| configSchemaPaths = []; | ||
| if (fs.existsSync(path.join(targetPath, 'dist-scalprum'))) { | ||
| configSchemaPaths.push( | ||
| path.join(targetPath, 'dist-scalprum/configSchema.json'), | ||
| ); | ||
| } | ||
| if (fs.existsSync(path.join(targetPath, 'dist'))) { | ||
| configSchemaPaths.push(path.join(targetPath, 'dist/.config-schema.json')); | ||
| } | ||
| configSchemaPaths = [path.join(targetPath, 'dist/.config-schema.json')]; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] error-handling The guard if (fs.existsSync(path.join(targetPath, 'dist'))) that previously protected the config-schema write path was removed. The new code unconditionally assigns configSchemaPaths. If dist-dynamic/dist does not exist, fs.writeJson throws ENOENT because it does not create parent directories. Suggested fix: Use fs.outputJson instead of fs.writeJson, or add await fs.ensureDir(path.dirname(configSchemaPath)) before the write loop. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] error-handling-idiom The guard that previously protected the config-schema write path was removed. The new code unconditionally assigns Suggested fix: Use |
||
| } else { | ||
| throw new Error( | ||
| 'Only packages with the "backend-plugin", "backend-plugin-module" or "frontend-plugin" roles can be exported as dynamic backend plugins', | ||
| 'Only packages with the "backend-plugin", "backend-plugin-module", "frontend-plugin" or "frontend-plugin-module" roles can be exported as dynamic plugins', | ||
| ); | ||
| } | ||
|
|
||
|
|
||
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.
Instead of adding tests that verify the
dist-scalprumdirectory no longer exists, we can just remove any expects on the directory entirely. If we no longer carry it as an implementation, I see no need to test its absence.