|
3 | 3 |
|
4 | 4 | import path from 'node:path' |
5 | 5 | import { execSync } from 'node:child_process' |
6 | | -import { existsSync, readdirSync } from 'node:fs' |
7 | 6 | import chalk from 'chalk' |
8 | 7 | import jsonfile from 'jsonfile' |
9 | 8 | import * as semver from 'semver' |
@@ -423,32 +422,6 @@ export async function publish(options) { |
423 | 422 | ) |
424 | 423 | } |
425 | 424 |
|
426 | | - if (existsSync(path.resolve(rootDir, 'examples'))) { |
427 | | - console.info('Updating examples to use new package versions') |
428 | | - const examplePkgJsonArray = /** @type {string[]} */ ( |
429 | | - readdirSync(path.resolve(rootDir, 'examples'), { |
430 | | - recursive: true, |
431 | | - }).filter( |
432 | | - (file) => |
433 | | - typeof file === 'string' && |
434 | | - file.includes('package.json') && |
435 | | - !file.includes('node_modules'), |
436 | | - ) |
437 | | - ) |
438 | | - for (const examplePkgJson of examplePkgJsonArray) { |
439 | | - await updatePackageJson( |
440 | | - path.resolve(rootDir, 'examples', examplePkgJson), |
441 | | - (config) => { |
442 | | - for (const pkg of changedPackages) { |
443 | | - if (config.dependencies?.[pkg.name]) { |
444 | | - config.dependencies[pkg.name] = `^${version}` |
445 | | - } |
446 | | - } |
447 | | - }, |
448 | | - ) |
449 | | - } |
450 | | - } |
451 | | - |
452 | 425 | if (!process.env.CI) { |
453 | 426 | console.warn( |
454 | 427 | `This is a dry run for version ${version}. Push to CI to publish for real or set CI=true to override!`, |
|
0 commit comments