Skip to content

Commit

Permalink
patch changeset to see only root workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Jan 8, 2025
1 parent 53b5cae commit 99b2530
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .yarn/patches/@changesets-cli-npm-2.27.11-fc68e5c2cd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/dist/changesets-cli.cjs.js b/dist/changesets-cli.cjs.js
index eaba708933af221632c9b54d09721ae5982e448a..c1eeb7d8374d0c68d966beb6e3d9fc7d251f7ef0 100644
--- a/dist/changesets-cli.cjs.js
+++ b/dist/changesets-cli.cjs.js
@@ -7,7 +7,7 @@ var util = require('util');
var config = require('@changesets/config');
var getDependentsGraph = require('@changesets/get-dependents-graph');
var shouldSkipPackage = require('@changesets/should-skip-package');
-var getPackages = require('@manypkg/get-packages');
+var getPackages = require('./get-packages.cjs');
var fs = require('fs-extra');
var path = require('path');
var pc = require('picocolors');
diff --git a/dist/changesets-cli.esm.js b/dist/changesets-cli.esm.js
index 817d3ceeca7adcdea87b1f5603b2aee4f06c57c8..9c0ac4f629af950850d36ca82208e9a449c90fe8 100644
--- a/dist/changesets-cli.esm.js
+++ b/dist/changesets-cli.esm.js
@@ -6,7 +6,8 @@ import { format } from 'util';
import { defaultWrittenConfig, read } from '@changesets/config';
import { getDependentsGraph } from '@changesets/get-dependents-graph';
import { shouldSkipPackage } from '@changesets/should-skip-package';
-import { getPackages } from '@manypkg/get-packages';
+import patchedGetPackages from './get-packages.cjs';
+const { getPackages } = patchedGetPackages;
import fs from 'fs-extra';
import path, { join } from 'path';
import pc from 'picocolors';
diff --git a/dist/get-packages.cjs b/dist/get-packages.cjs
new file mode 100644
index 0000000000000000000000000000000000000000..8603427a1d4f7a80ad168f354c3d843b676a11ab
--- /dev/null
+++ b/dist/get-packages.cjs
@@ -0,0 +1,16 @@
+var fs = require('fs-extra');
+var path = require('path');
+module.exports = {
+ // even though there's a "website" workspace, we only care are about the root
+ getPackages: (cwd) => {
+ const root = {
+ dir: cwd,
+ packageJson: fs.readJsonSync(path.join(cwd, 'package.json')),
+ };
+ return {
+ tool: 'root',
+ root,
+ packages: [root],
+ };
+ },
+};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.11",
"@changesets/cli": "patch:@changesets/cli@npm%3A2.27.11#~/.yarn/patches/@changesets-cli-npm-2.27.11-fc68e5c2cd.patch",
"@fastify/websocket": "^9.0.0",
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
"@rollup/plugin-terser": "^0.4.4",
Expand Down
42 changes: 40 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ __metadata:
languageName: node
linkType: hard

"@changesets/cli@npm:^2.27.11":
"@changesets/cli@npm:2.27.11":
version: 2.27.11
resolution: "@changesets/cli@npm:2.27.11"
dependencies:
Expand Down Expand Up @@ -357,6 +357,44 @@ __metadata:
languageName: node
linkType: hard

"@changesets/cli@patch:@changesets/cli@npm%3A2.27.11#~/.yarn/patches/@changesets-cli-npm-2.27.11-fc68e5c2cd.patch":
version: 2.27.11
resolution: "@changesets/cli@patch:@changesets/cli@npm%3A2.27.11#~/.yarn/patches/@changesets-cli-npm-2.27.11-fc68e5c2cd.patch::version=2.27.11&hash=a81e99"
dependencies:
"@changesets/apply-release-plan": "npm:^7.0.7"
"@changesets/assemble-release-plan": "npm:^6.0.5"
"@changesets/changelog-git": "npm:^0.2.0"
"@changesets/config": "npm:^3.0.5"
"@changesets/errors": "npm:^0.2.0"
"@changesets/get-dependents-graph": "npm:^2.1.2"
"@changesets/get-release-plan": "npm:^4.0.6"
"@changesets/git": "npm:^3.0.2"
"@changesets/logger": "npm:^0.1.1"
"@changesets/pre": "npm:^2.0.1"
"@changesets/read": "npm:^0.6.2"
"@changesets/should-skip-package": "npm:^0.1.1"
"@changesets/types": "npm:^6.0.0"
"@changesets/write": "npm:^0.3.2"
"@manypkg/get-packages": "npm:^1.1.3"
ansi-colors: "npm:^4.1.3"
ci-info: "npm:^3.7.0"
enquirer: "npm:^2.4.1"
external-editor: "npm:^3.1.0"
fs-extra: "npm:^7.0.1"
mri: "npm:^1.2.0"
p-limit: "npm:^2.2.0"
package-manager-detector: "npm:^0.2.0"
picocolors: "npm:^1.1.0"
resolve-from: "npm:^5.0.0"
semver: "npm:^7.5.3"
spawndamnit: "npm:^3.0.1"
term-size: "npm:^2.1.0"
bin:
changeset: bin.js
checksum: 10c0/026c0c1cd99cf5f45d816d79eb977e73715e8f0605aedcb94b0e2f63e85fde9780e02ac65806522700b2c9dcdee50dcfc436479dd39c9870bdee5aa9719f52eb
languageName: node
linkType: hard

"@changesets/config@npm:^3.0.5":
version: 3.0.5
resolution: "@changesets/config@npm:3.0.5"
Expand Down Expand Up @@ -4768,7 +4806,7 @@ __metadata:
resolution: "graphql-ws@workspace:."
dependencies:
"@changesets/changelog-github": "npm:^0.5.0"
"@changesets/cli": "npm:^2.27.11"
"@changesets/cli": "patch:@changesets/cli@npm%3A2.27.11#~/.yarn/patches/@changesets-cli-npm-2.27.11-fc68e5c2cd.patch"
"@fastify/websocket": "npm:^9.0.0"
"@ianvs/prettier-plugin-sort-imports": "npm:^4.4.0"
"@rollup/plugin-terser": "npm:^0.4.4"
Expand Down

0 comments on commit 99b2530

Please sign in to comment.