Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions src/publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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!`,
Expand Down