Skip to content

Commit

Permalink
Merge pull request #2004 from embroider-build/pnpm-publish-unstable
Browse files Browse the repository at this point in the history
use pnpm to publish unstable
  • Loading branch information
mansona authored Jun 24, 2024
2 parents 3734d9f + ab321d1 commit e42ad83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
4 changes: 3 additions & 1 deletion test-packages/unstable-release/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ async function publish() {
for (let workspace of publicWorkspaces) {
console.info(`Publishing ${workspace}`);
try {
await execaCommand('npm publish --tag=unstable --verbose --access=public', { cwd: dirname(workspace) });
await execaCommand('pnpm publish --no-git-checks --tag=unstable --verbose --access=public', {
cwd: dirname(workspace),
});
} catch (err) {
console.info(`Publishing ${workspace} has failed. A full list of errors will be printed at the end of this run`);
errors.push(err);
Expand Down
26 changes: 0 additions & 26 deletions test-packages/unstable-release/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ async function updateVersions() {
console.info(`Setting version of ${workspace}`);
await setVersion(sha, workspace);
}

// Update each dependency to use the new versions
for (let workspace of publicWorkspaces) {
console.info(`Updating dependencies of ${workspace}`);
await updateDependencies(workspace);
}
}

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

await fse.writeJSON(filePath, json, { spaces: 2 });
}

async function updateDependencies(filePath) {
let json = await fse.readJSON(filePath);

for (let [dep, version] of Object.entries(NEW_VERSIONS)) {
if ((json.dependencies || {})[dep]) {
json.dependencies[dep] = version;
}

if ((json.devDependencies || {})[dep]) {
json.devDependencies[dep] = version;
}

if ((json.peerDependencies || {})[dep]) {
json.peerDependencies[dep] = version;
}
}

await fse.writeJSON(filePath, json, { spaces: 2 });
}

0 comments on commit e42ad83

Please sign in to comment.