Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Update plugin and Yeoman generator to 0.21.0, add more recent components from Octant #21

Merged
merged 4 commits into from
Jun 17, 2021

Conversation

liamrathke
Copy link
Contributor

@liamrathke liamrathke commented May 28, 2021

NPM Version updates:

  • plugin/package.json updated from 0.2.2 to 0.21.0
  • yeoman-generator/package.json updated from 0.2.2 to 0.21.0

There are issues with Yeoman pulling outdated code from NPM, leading to newly-created plugins not installing (see #20), so updating the version should result in future Yeoman generations to use correct code. Additionally, this PR adds more components to the plugin, generated by command in the main Octant repo (reference).

If/when this PR is merged in, the following commands might need to be run to publish the revised package versions to NPM:

  • npm publish inside ./plugin
  • npm publish inside ./yeoman-generator

Potential testing steps

After publishing,

  1. Create and open a new directory on a local machine
  2. Run npm update -g @project-octant/generator-octant-plugin to update the generator globally
  3. Run yo @project-octant/octant-plugin to generate a new plugin with Yeoman
  4. Run npm run plugin:install and verify that the project compiles on the first try

Octant component update

As described above, the go run ./cmd/ts-component-gen/main.go was run to programmatically update the TS components in the plugin/components directory.

Notes

Almost all components generated successfully, with the exception of ExpandableRowDetail (source file); attempting to generate it threw the following error:

reflect154485806/reflect.go:91:27: undefined: component.ExpandableRowDetailConfig

Since generating this component would require changes to the main Octant repo, I left it out of the PR; if we decide that this component is necessary, maybe we could create another PR that addresses ExpandableRowDetail specifically. My main concern when making these changes was to update the plugin and the Yeoman generator so that users can build functional plugins without needing to edit pre-generated code.

This error has been resolved, please see the upstream PR here.

To reset versioning issues and provide users with more up-to-date components
@GuessWhoSamFoo
Copy link
Contributor

An upstream PR is needed to update the config name from ExpandableDetailConfig to ExpandableDetailConfig per convention.

Main repo revised to generate this component correctly
@GuessWhoSamFoo
Copy link
Contributor

@wwitzel3
Copy link
Contributor

wwitzel3 commented Jun 2, 2021

Starting with this version we will bump the ts library to match the Octant version that generated the code.

Signed-off-by: Liam Rathke <lrathke@vmware.com>
@liamrathke
Copy link
Contributor Author

Starting with this version we will bump the ts library to match the Octant version that generated the code.

Just bumped the package versions accordingly

@liamrathke
Copy link
Contributor Author

Follow-up question, the Yeoman version is incremented here as well; is this (Yeoman being aligned with the Octant and plugin versions) something we want? This would be convenient, but updates there will take place much less frequently, so we would be releasing many (identical) versions of the Yeoman generator with no changes.

Perhaps we could edit the minimum @project-octant/plugin version field in yeoman-generator/generators/app/templates/package.json.tpl so that it matches the central Octant version number?

@liamrathke liamrathke changed the title Update plugin and Yeoman generator to 0.3.0, add more recent components from Octant Update plugin and Yeoman generator to 0.21.0, add more recent components from Octant Jun 2, 2021
Command rerun after Octant 0.21 released
@GuessWhoSamFoo GuessWhoSamFoo merged commit 551dc64 into vmware-archive:main Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants