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

Workspaces support #1778

Merged
merged 49 commits into from
May 16, 2023
Merged

Workspaces support #1778

merged 49 commits into from
May 16, 2023

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Apr 6, 2023

WHAT is this pull request doing?

Related to https://github.com/Shopify/internal-cli-foundations/issues/311

  • New apps will be created using workspaces
  • Extensions now have a package.json with the needed dependencies.
  • A warning is shown during dev and build if the app doesn't support workspaces yet.

⚠️ Disclaimer:

  • Although extensions templates have a package.json, the dependency used is the one defined in the specification. Why? because having two places is confusing, eventually we should remove the dependency from the spec and just use whatever is in the json, but that's tricky. Should we just remove the dependency from the json for now?

How to test your changes?

  • Create a new app, add extensions to it
  • You should see that each extension has its own package.json and its own node_modules
  • During dev you shouldn't see the "Installing dependencies" message
  • If you run dev or build in a non-workspace app, you should see a warning message.

Post-release steps

Release https://github.com/Shopify/shopify-dev/pull/33782

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/theme-developer-tools
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@isaacroldan isaacroldan marked this pull request as ready for review April 6, 2023 16:14
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "yarn changeset add" to track your changes and include them in the next release CHANGELOG.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
70.84% (-0.03% 🔻)
4535/6402
🟡 Branches
68.02% (-0.24% 🔻)
2080/3058
🟡 Functions
68.32% (+0.04% 🔼)
1197/1752
🟡 Lines
72.33% (-0.04% 🔻)
4334/5992
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / app.ts
70.59% (-1.96% 🔻)
47.62% 50%
73.91% (-2.17% 🔻)
🔴
... / dev.ts
4%
1.18% (-0.03% 🔻)
11.54% 4.35%
🟢
... / extension.ts
86.6% (-2.17% 🔻)
69.81% (-10.19% 🔻)
90.91% (+0.91% 🔼)
86.32% (-2.45% 🔻)

Test suite run success

1148 tests passing in 561 suites.

Report generated by 🧪jest coverage report action from 89e67d3

@github-actions
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

Copy link
Contributor

@alvaro-shopify alvaro-shopify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job with this one!

@github-actions
Copy link
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -170,6 +170,11 @@ export interface PackageJson {
      *  The prettier attribute of the package.json
      */
     prettier?: string;
+    /**
+     * The private attribute of the package.json.
+     * https://docs.npmjs.com/cli/v9/configuring-npm/package-json#private
+     */
+    private?: boolean;
 }
 /**
  * Reads and parses a package.json

@isaacroldan isaacroldan added this pull request to the merge queue May 16, 2023
Merged via the queue into main with commit 95d6bb4 May 16, 2023
@isaacroldan isaacroldan deleted the workspaces-support branch May 16, 2023 09:18
@shopify-shipit shopify-shipit bot temporarily deployed to nightly May 16, 2023 09:18 Inactive
@gonzaloriestra gonzaloriestra added the includes-post-release-steps PRs including this label require additional steps after releasing label May 19, 2023
@shopify-shipit shopify-shipit bot temporarily deployed to production May 22, 2023 14:30 Inactive
@isaacroldan isaacroldan removed the includes-post-release-steps PRs including this label require additional steps after releasing label May 22, 2023
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.

4 participants