From 3ec6553608c6cec2460fe54a66835a204bea8488 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:09:06 +1100 Subject: [PATCH] fix: Disable updating example dependencies --- src/publish/index.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/publish/index.js b/src/publish/index.js index 7e75d64..c4225a5 100644 --- a/src/publish/index.js +++ b/src/publish/index.js @@ -3,7 +3,6 @@ import path from 'node:path' import { execSync } from 'node:child_process' -import { existsSync, readdirSync } from 'node:fs' import chalk from 'chalk' import jsonfile from 'jsonfile' import * as semver from 'semver' @@ -423,32 +422,6 @@ export async function publish(options) { ) } - if (existsSync(path.resolve(rootDir, 'examples'))) { - console.info('Updating examples to use new package versions') - const examplePkgJsonArray = /** @type {string[]} */ ( - readdirSync(path.resolve(rootDir, 'examples'), { - recursive: true, - }).filter( - (file) => - typeof file === 'string' && - file.includes('package.json') && - !file.includes('node_modules'), - ) - ) - for (const examplePkgJson of examplePkgJsonArray) { - await updatePackageJson( - path.resolve(rootDir, 'examples', examplePkgJson), - (config) => { - for (const pkg of changedPackages) { - if (config.dependencies?.[pkg.name]) { - config.dependencies[pkg.name] = `^${version}` - } - } - }, - ) - } - } - if (!process.env.CI) { console.warn( `This is a dry run for version ${version}. Push to CI to publish for real or set CI=true to override!`,