Skip to content

Commit

Permalink
Patch changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Jul 25, 2024
1 parent a4613bf commit 1d9f324
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 55 deletions.
13 changes: 13 additions & 0 deletions .changeset/famous-glasses-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@salt-ds/ag-grid-theme": patch
"@salt-ds/countries": patch
"@salt-ds/data-grid": patch
"@salt-ds/styles": patch
"@salt-ds/window": patch
"@salt-ds/icons": patch
"@salt-ds/theme": patch
"@salt-ds/core": patch
"@salt-ds/lab": patch
---

Update build tooling
74 changes: 74 additions & 0 deletions .yarn/patches/@changesets-cli-npm-2.27.7-1c109a185d.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
diff --git a/dist/changesets-cli.cjs.js b/dist/changesets-cli.cjs.js
index 9fdc475d0aed8135bb8f0f0b57cf98204dad27c8..7324fe54cd0493e13ba7f46163942060db5c85b0 100644
--- a/dist/changesets-cli.cjs.js
+++ b/dist/changesets-cli.cjs.js
@@ -740,6 +740,7 @@ let getOtpCode = async twoFactorState => {
async function internalPublish(pkgName, opts, twoFactorState) {
let publishTool = await getPublishTool(opts.cwd);
let publishFlags = opts.access ? ["--access", opts.access] : [];
+
publishFlags.push("--tag", opts.tag);

if ((await twoFactorState.isRequired) && !ciInfo.isCI) {
@@ -760,14 +761,24 @@ async function internalPublish(pkgName, opts, twoFactorState) {
code,
stdout,
stderr
- } = publishTool.name === "pnpm" ? await spawn__default["default"]("pnpm", ["publish", "--json", ...publishFlags], {
- env: Object.assign({}, process.env, envOverride),
- cwd: opts.cwd
- }) : await spawn__default["default"](publishTool.name, ["publish", opts.publishDir, "--json", ...publishFlags], {
+ } = await spawn__default["default"]("yarn", ["npm", "publish", ...publishFlags], {
+ cwd: opts.cwd,
env: Object.assign({}, process.env, envOverride)
});

if (code !== 0) {
+ const output = stdout
+ .toString()
+ .trim()
+ .split("\n")
+ // this filters out "unnamed" logs: https://yarnpkg.com/advanced/error-codes/#yn0000---unnamed
+ // this includes a list of packed files and the "summary output" like: "Failed with errors in 0s 75ms"
+ // those are not that interesting so we reduce the noise by dropping them
+ .filter(line => !/YN0000:/.test(line))
+ .join("\n");
+ logger.error(`an error occurred while publishing ${pkgName}:`, `\n${output}`);
+ return { published: false };
+
// NPM's --json output is included alongside the `prepublish` and `postpublish` output in terminal
// We want to handle this as best we can but it has some struggles:
// - output of those lifecycle scripts can contain JSON
diff --git a/dist/changesets-cli.esm.js b/dist/changesets-cli.esm.js
index 67ec717f672f330d742beb4cdddf9fa330f7dd5c..b537b313ec2915012a2e96af560ebb46a98abd64 100644
--- a/dist/changesets-cli.esm.js
+++ b/dist/changesets-cli.esm.js
@@ -720,14 +720,24 @@ async function internalPublish(pkgName, opts, twoFactorState) {
code,
stdout,
stderr
- } = publishTool.name === "pnpm" ? await spawn$1("pnpm", ["publish", "--json", ...publishFlags], {
- env: Object.assign({}, process.env, envOverride),
- cwd: opts.cwd
- }) : await spawn$1(publishTool.name, ["publish", opts.publishDir, "--json", ...publishFlags], {
+ } = await spawn$1("yarn", ["npm", "publish", ...publishFlags], {
+ cwd: opts.cwd,
env: Object.assign({}, process.env, envOverride)
});

if (code !== 0) {
+ const output = stdout
+ .toString()
+ .trim()
+ .split("\n")
+ // this filters out "unnamed" logs: https://yarnpkg.com/advanced/error-codes/#yn0000---unnamed
+ // this includes a list of packed files and the "summary output" like: "Failed with errors in 0s 75ms"
+ // those are not that interesting so we reduce the noise by dropping them
+ .filter(line => !/YN0000:/.test(line))
+ .join("\n");
+ error(`an error occurred while publishing ${pkgName}:`, `\n${output}`);
+ return { published: false };
+
// NPM's --json output is included alongside the `prepublish` and `postpublish` output in terminal
// We want to handle this as best we can but it has some struggles:
// - output of those lifecycle scripts can contain JSON
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@biomejs/biome": "1.8.3",
"@biomejs/js-api": "^0.6.2",
"@biomejs/wasm-nodejs": "^1.8.3",
"@changesets/cli": "^2.27.7",
"@changesets/cli": "patch:@changesets/cli@npm%3A2.27.7#~/.yarn/patches/@changesets-cli-npm-2.27.7-1c109a185d.patch",
"@cypress/code-coverage": "^3.12.44",
"@faker-js/faker": "^8.0.0",
"@fontsource/open-sans": "^4.5.13",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"sideEffects": false,
"dependencies": {
"@floating-ui/react": "^0.26.5",
"@salt-ds/icons": "workspace:*",
"@salt-ds/styles": "workspace:*",
"@salt-ds/window": "workspace:*",
"@salt-ds/icons": "workspace:^",
"@salt-ds/styles": "workspace:^",
"@salt-ds/window": "workspace:^",
"clsx": "^2.0.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/countries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"copy:css": "yarn node ./scripts/copyCss.mjs"
},
"dependencies": {
"@salt-ds/core": "workspace:*",
"@salt-ds/styles": "workspace:*",
"@salt-ds/window": "workspace:*",
"@salt-ds/core": "workspace:^",
"@salt-ds/styles": "workspace:^",
"@salt-ds/window": "workspace:^",
"clsx": "^2.0.0"
},
"peerDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"main": "src/index.ts",
"sideEffects": false,
"dependencies": {
"@salt-ds/core": "workspace:*",
"@salt-ds/icons": "workspace:*",
"@salt-ds/lab": "workspace:",
"@salt-ds/styles": "workspace:*",
"@salt-ds/window": "workspace:*",
"@salt-ds/core": "workspace:^",
"@salt-ds/icons": "workspace:^",
"@salt-ds/lab": "workspace:*",
"@salt-ds/styles": "workspace:^",
"@salt-ds/window": "workspace:^",
"clsx": "^2.0.0"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"clean": "rimraf ./src/components"
},
"dependencies": {
"@salt-ds/styles": "workspace:*",
"@salt-ds/window": "workspace:*",
"@salt-ds/styles": "workspace:^",
"@salt-ds/window": "workspace:^",
"clsx": "^2.0.0"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@floating-ui/react": "^0.26.5",
"@fluentui/react-overflow": "^9.0.19",
"@internationalized/date": "^3.0.0",
"@salt-ds/core": "workspace:*",
"@salt-ds/icons": "workspace:*",
"@salt-ds/styles": "workspace:*",
"@salt-ds/window": "workspace:*",
"@salt-ds/core": "workspace:^",
"@salt-ds/icons": "workspace:^",
"@salt-ds/styles": "workspace:^",
"@salt-ds/window": "workspace:^",
"@types/react-window": "^1.8.2",
"aria-hidden": "^1.1.1",
"attr-accept": "^2.0.0",
Expand Down
Loading

0 comments on commit 1d9f324

Please sign in to comment.