Skip to content

Commit e36975c

Browse files
fix: Disable updating example dependencies (#20)
1 parent fc2e655 commit e36975c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/publish/index.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import path from 'node:path'
55
import { execSync } from 'node:child_process'
6-
import { existsSync, readdirSync } from 'node:fs'
76
import chalk from 'chalk'
87
import jsonfile from 'jsonfile'
98
import * as semver from 'semver'
@@ -423,32 +422,6 @@ export async function publish(options) {
423422
)
424423
}
425424

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-
452425
if (!process.env.CI) {
453426
console.warn(
454427
`This is a dry run for version ${version}. Push to CI to publish for real or set CI=true to override!`,

0 commit comments

Comments
 (0)