Skip to content
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

RHCLOUD-24456: Add base URL to plugin manifest #206

Merged

Conversation

vojtechszocs
Copy link
Contributor

@vojtechszocs vojtechszocs commented Feb 22, 2023

  • add new mandatory field baseURL to plugin manifest, computed from webpack output.publicPath option
  • baseURL should have a trailing slash as per common webpack recommendation (if not, emit a build warning)
  • expose processed manifest object to consumers at runtime via LoadedPluginInfoEntry type - contains everything from raw manifest, minus extensions, plus fallbacks for optional properties missing in raw manifest
  • sample-plugin/plugin-metadata.json ➡️ sample-plugin/plugin-metadata.ts for better type checking

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2023
@vojtechszocs
Copy link
Contributor Author

make semver related imports more specific for better module tree shaking

Using webpack-bundle-analyzer shows that

import { valid as semverValid, satisfies as semverSatisfies } from 'semver';
import type { RangeOptions as SemverRangeOptions } from 'semver';

vs.

import * as semver from 'semver';

has no impact on which semver code gets pulled into the webpack compilation of the sample application.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

@vojtechszocs: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@vojtechszocs
Copy link
Contributor Author

/hold

Some small improvements incoming.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2023
@vojtechszocs
Copy link
Contributor Author

/hold cancel

I'll post these improvements in a follow-up PR.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2023
@vojtechszocs vojtechszocs changed the title Add base URL (webpack output.publicPath) to plugin manifest RHCLOUD-24456: Add base URL (webpack output.publicPath) to plugin manifest Feb 28, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 28, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 28, 2023

@vojtechszocs: This pull request references RHCLOUD-24456 which is a valid jira issue.

In response to this:

  • add new mandatory field baseURL to plugin manifest, computed from webpack output.publicPath option
  • baseURL should have a trailing slash as per common webpack recommendation (if not, emit a build warning)
  • expose processed manifest object to consumers at runtime via LoadedPluginInfoEntry type - contains everything from raw manifest, minus extensions, plus fallbacks for optional properties missing in raw manifest
  • sample-plugin/plugin-metadata.json ➡️ sample-plugin/plugin-metadata.ts for better type checking

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vojtechszocs vojtechszocs changed the title RHCLOUD-24456: Add base URL (webpack output.publicPath) to plugin manifest RHCLOUD-24456: Add base URL to plugin manifest Feb 28, 2023
@florkbr
Copy link
Contributor

florkbr commented Mar 1, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2023
@openshift-merge-robot openshift-merge-robot merged commit f8078b1 into openshift:main Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants