-
Notifications
You must be signed in to change notification settings - Fork 296
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
Move js dependencies required for storybook into their own workspace #10091
Comments
Hi @hussain-t, thanks for drafting this IB. It's mostly looking good, but I am a bit unsure about this point (presumably you mean copying the scripts for running Storybook, but that's not what I am unsure about):
Considering the I think we should move all Storybook scripts into the workspace Also, regarding this point:
That mostly works, but we need to take care to ensure that shared dependencies (e.g. Alternatively, maybe we can simply leave our |
Actually, thinking about it we're going to run into the same sort of issue in #10092 - essentially, we need to make sure our versions of packages used by the files in Working on this issue and #10092 in parallel could lead to conflicts, I think it would make sense to do one after the other. I've gone ahead and made this issue a dependency for #10092. |
@hussain-t, i have updated AC to move storybook config as well. Plus, pay attention that |
Note that once #10113 is merged this ticket can move puppeteer and puppeteer-core to the workspace package.json files. |
Thanks @benbowler, did you mean to link to a different issue though? |
@techanvil similar looking number but I meant: #10013 |
Hey @benbowler, please see this #10092 (comment) with reference to the IB for this issue. |
Thanks @techanvil, replied in #10092 (comment) and updated based on the concept of duplicating dependencies and creating a script here to check shared package versions. |
Thanks @benbowler! The IB is mostly there, I just have a couple of points for consideration:
It would be good to be clearer about what need to be considered common dependencies as this seems a bit open to interpretation. Clearly, all the dependencies of the actual plugin JS code are common, and anything related to the build processes that can affect the build output should be as well. Considering how the Webpack config is structured we probably need to say that all Webpack related dependencies need to be kept in sync. I'm not sure if there's anything else that needs to be clarified but the current phrasing is a bit ambiguous, please give it a bit more thought. It would also be useful to provide a bit more steerage for the implementation of this script, e.g. its location, the GH workflow file name, and any considerations for the GH workflow implementation itself - can we use one of the existing workflows for reference? |
Feature Description
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
package.json
file is updated to havestorybook
in the workspaces array.site-kit-wp/package.json
Line 80 in 37b72fa
Implementation Brief
Creating the assets workspace
package.json
file to include"storybook"
in itsworkspaces
array.package.json
file in thestorybook
folder usingnpm init -w ./storybook
.scripts
used to build and run storybook into the new workspace package.json.package.json
file and move all dependencies that are used in storybook to its own package by uninstalling them in the mainpackage.json
file and installing with-w ./storybook
argument to specify the correct workspace.package.json
file to proxy storybook commands to the correct workspace using thenpm run ... -w ./storybook
approach.Create a check for mismatched asset build package versions
As some of the core plugin build commands are used in both the assets and storybook workspace, we need to ensure they match. For now we can use a GH check, in future we can explore setting the assets workspace as a dependency of the storybook workspace.
package.json
orstorybook/package.json
are modified, checking for any mismatched versions for packages that build the core assets.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: