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

fix: use https://github.com/primer/view_components/blob/main/static/info_arch.json as source for View Components #4

Merged
merged 1 commit into from Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions patches/@changesets+cli+2.26.1.patch
@@ -1,5 +1,5 @@
diff --git a/node_modules/@changesets/cli/dist/cli.cjs.dev.js b/node_modules/@changesets/cli/dist/cli.cjs.dev.js
index 73ab02a..f78765a 100644
index 73ab02a..70bb64b 100644
--- a/node_modules/@changesets/cli/dist/cli.cjs.dev.js
+++ b/node_modules/@changesets/cli/dist/cli.cjs.dev.js
@@ -101,7 +101,7 @@ function _objectSpread2(target) {
Expand Down Expand Up @@ -57,19 +57,19 @@ index 73ab02a..f78765a 100644
+ ...Object.values(components).map((component) => component.name)
+ );
+ } else if (pkg.name === "@primer/view-components") {
+ logger.log(
+ `Loading components information for ${pkg.name} from https://primer.github.io/view_components/components.json`
+ const componentsPath = path__default["default"].join(
+ process.cwd(),
+ "static/info_arch.json"
+ );
+
+ if (!globalThis?.fetch) {
+ throw new Error(`This CLI must be run in a Node.js 18+`);
+ }
+ logger.log(
+ `Loading components information for ${pkg.name} from ${componentsPath}`
+ );
+
+ const response = await fetch(
+ "https://primer.github.io/view_components/components.json"
+ const components = require(componentsPath);
+ primerPackages.push(
+ ...Object.values(components).map((component) => component.fully_qualified_name)
+ );
+ const components = await response.json();
+ primerPackages.push(...components.map((component) => component.id));
+ } else {
+ if (!SUPPORTED_PRIMER_PACKAGES.includes(pkg.name)) {
+ throw new Error(
Expand Down