Skip to content

Commit

Permalink
fix: remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliemiron committed Apr 7, 2023
1 parent 695ab4b commit 23593b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions packages/blitz/src/cli/utils/codegen-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {join} from "path"
import fs from "fs-extra"
import {getPackageJson} from "./get-package-json"
import {runPrisma} from "../../utils/run-prisma"
import {toValidSemver} from "./helpers"
import semver from "semver"

import resolveFrom from "resolve-from"
Expand All @@ -20,7 +19,7 @@ export const codegenTasks = async () => {
const readFile = await fs.readFile(nextClientIndex)
const packageJson = await getPackageJson()
const version = packageJson.dependencies.next
const nextVersion = semver.clean(version, { loose: true }) || semver.valid(semver.coerce(version))
const nextVersion = semver.clean(version, {loose: true}) || semver.valid(semver.coerce(version))

if (nextVersion && /^([~^])?12/.test(nextVersion)) {
const updatedFile = readFile
Expand Down
5 changes: 0 additions & 5 deletions packages/blitz/src/cli/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,3 @@ export function getPkgManager() {
export const isInternalBlitzMonorepoDevelopment =
existsSync(join(process.cwd(), "..", "..", "packages", "blitz", "dist", "chunks")) &&
existsSync(join(process.cwd(), "..", "..", "packages", "blitz-next", "dist", "chunks"))

export const toValidSemver = (version: string) => {
const components = version.split(".")
return components.length === 2 ? version + ".0" : version
}

0 comments on commit 23593b7

Please sign in to comment.