Skip to content

Commit 0d1822c

Browse files
committed
Apply PR feedback
1 parent ca3f0a2 commit 0d1822c

File tree

9 files changed

+39
-20
lines changed

9 files changed

+39
-20
lines changed

src/release-specification.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,8 @@ export function findMissingUnreleasedDependents(
184184
(possibleDependentName) => {
185185
const possibleDependent =
186186
project.workspacePackages[possibleDependentName];
187-
const { dependencies, peerDependencies } =
188-
possibleDependent.validatedManifest;
189-
return (
190-
hasProperty(dependencies, packageName) ||
191-
hasProperty(peerDependencies, packageName)
192-
);
187+
const { peerDependencies } = possibleDependent.validatedManifest;
188+
return hasProperty(peerDependencies, packageName);
193189
},
194190
);
195191

src/ui/App.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,12 @@ function App() {
294294
<h2 className="text-2xl font-bold mb-4">
295295
Release Branch Successfully Created!
296296
</h2>
297-
<p className="mb-6">You can now close this window.</p>
297+
<p className="mb-6">
298+
You are now on a new branch that represents the new release. You are
299+
free to close this window and make whatever other changes you would
300+
like to the branch. When you're ready, push it up and make a new
301+
pull request.
302+
</p>
298303
</div>
299304
</div>
300305
);
@@ -304,6 +309,27 @@ function App() {
304309
<div className="container mx-auto px-4 py-8">
305310
<h1 className="text-3xl font-bold mb-6">Create New Core Release</h1>
306311

312+
<div className="mb-6 p-4 bg-gray-50 rounded border border-gray-200">
313+
<h2 className="text-xl font-semibold mb-2">How to use this tool</h2>
314+
<p className="mb-2">
315+
Listed below are the packages in this monorepo which have unreleased
316+
changes. You do not need to release all packages; you may release a
317+
subset. To add a new package, you first need to decide how to bump its
318+
version. Look over the changelog or commit history to understand the
319+
nature of the changes that have been made to the package. Then you can
320+
select a version from the dropdown next to the package. If there are
321+
breaking changes, select "Major"; if there are new features, select
322+
"Minor"; and if there are only non-functional backward-compatible
323+
changes, select "Patch".
324+
</p>
325+
<p>
326+
Some packages are linked via dependencies, and because of this you may
327+
be asked to include other packages in the release you were not
328+
anticipating. We've done our best to explain why, but feel free to
329+
reach out to the Wallet Framework team if you have any questions.
330+
</p>
331+
</div>
332+
307333
<div className="mb-4 p-4 bg-gray-100 rounded">
308334
{showCheckboxes && selectedPackages.size > 0 ? (
309335
<>

src/ui/DependencyErrorSection.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ type DependencyErrorSectionProps = {
22
title: string;
33
items: string[];
44
setSelections: React.Dispatch<React.SetStateAction<Record<string, string>>>;
5+
description: string;
56
};
67

78
export function DependencyErrorSection({
89
title,
910
items,
1011
setSelections,
12+
description,
1113
}: DependencyErrorSectionProps) {
1214
return (
1315
<div className="text-red-800">
@@ -31,10 +33,7 @@ export function DependencyErrorSection({
3133
Skip All
3234
</button>
3335
</div>
34-
<p className="text-sm mb-2">
35-
Please either include these packages in your release selections, or
36-
choose "Skip" if you are absolutely sure they are safe to omit:
37-
</p>
36+
<p className="text-sm mb-2">{description}</p>
3837
<ul className="list-disc ml-4">
3938
{items.map((dep) => (
4039
<li key={dep} className="flex justify-between items-center mb-2">

src/ui/ErrorMessage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ export function ErrorMessage({ errors }: ErrorMessageProps) {
88
return (
99
<div className="mt-4 p-4 bg-red-50 border border-red-200 rounded-lg">
1010
<h3 className="text-red-700 font-semibold mb-2">
11-
{
12-
'Your release spec could not be processed due to the following issues:'
13-
}
11+
{'Your release could not be created due to the following issues:'}
1412
</h3>
1513
<ul className="list-disc pl-5">
1614
{errors.map((error, index) => (

src/ui/PackageItem.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ export function PackageItem({
121121
title="Missing Dependencies"
122122
items={packageDependencyErrors[pkg.name].missingDependencies}
123123
setSelections={setSelections}
124+
description={`The following packages are dependencies or peer dependencies of ${pkg.name}. Because they may have introduced new changes that ${pkg.name} is now using, you need to verify whether to include them in the release.
125+
126+
To do this, look at the change history for each package and compare it with the change history for ${pkg.name}. If ${pkg.name} uses any new changes from a package, then you need to include it by bumping its version. If you have confirmed that the changes to a package do not affect ${pkg.name}, you may omit it from the release by choosing "Skip" instead.`}
124127
/>
125128
)}
126129
{packageDependencyErrors[pkg.name].missingDependentNames.length >
@@ -132,6 +135,7 @@ export function PackageItem({
132135
packageDependencyErrors[pkg.name].missingDependentNames
133136
}
134137
setSelections={setSelections}
138+
description={`Because ${pkg.name} is being released with a new major version, to prevent peer dependency warnings in consuming projects, all of the following packages which list as a peer dependency need to be included in the release. Please choose new versions for these packages. If for some reason you feel it is safe to omit a package you may choose "Skip".`}
135139
/>
136140
</div>
137141
)}

src/ui/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading

src/ui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Create New Core Release</title>
7-
<link rel="icon" href="./metamask-fox.svg" />
7+
<link rel="icon" href="./favicon.svg" />
88
</head>
99
<body>
1010
<div id="root"></div>

src/ui/metamask-fox.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/ui/style.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
@import 'tailwindcss';
2-
3-
@tailwind base;
4-
@tailwind components;
5-
@tailwind utilities;

0 commit comments

Comments
 (0)