Skip to content

Commit e42ad83

Browse files
authored
Merge pull request #2004 from embroider-build/pnpm-publish-unstable
use pnpm to publish unstable
2 parents 3734d9f + ab321d1 commit e42ad83

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

test-packages/unstable-release/publish.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ async function publish() {
1010
for (let workspace of publicWorkspaces) {
1111
console.info(`Publishing ${workspace}`);
1212
try {
13-
await execaCommand('npm publish --tag=unstable --verbose --access=public', { cwd: dirname(workspace) });
13+
await execaCommand('pnpm publish --no-git-checks --tag=unstable --verbose --access=public', {
14+
cwd: dirname(workspace),
15+
});
1416
} catch (err) {
1517
console.info(`Publishing ${workspace} has failed. A full list of errors will be printed at the end of this run`);
1618
errors.push(err);

test-packages/unstable-release/version.js

-26
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ async function updateVersions() {
1717
console.info(`Setting version of ${workspace}`);
1818
await setVersion(sha, workspace);
1919
}
20-
21-
// Update each dependency to use the new versions
22-
for (let workspace of publicWorkspaces) {
23-
console.info(`Updating dependencies of ${workspace}`);
24-
await updateDependencies(workspace);
25-
}
2620
}
2721

2822
updateVersions();
@@ -44,23 +38,3 @@ async function setVersion(sha, filePath) {
4438

4539
await fse.writeJSON(filePath, json, { spaces: 2 });
4640
}
47-
48-
async function updateDependencies(filePath) {
49-
let json = await fse.readJSON(filePath);
50-
51-
for (let [dep, version] of Object.entries(NEW_VERSIONS)) {
52-
if ((json.dependencies || {})[dep]) {
53-
json.dependencies[dep] = version;
54-
}
55-
56-
if ((json.devDependencies || {})[dep]) {
57-
json.devDependencies[dep] = version;
58-
}
59-
60-
if ((json.peerDependencies || {})[dep]) {
61-
json.peerDependencies[dep] = version;
62-
}
63-
}
64-
65-
await fse.writeJSON(filePath, json, { spaces: 2 });
66-
}

0 commit comments

Comments
 (0)