Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
build(nuxt): use latest nitropack-edge on release (#7036)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Aug 30, 2022
1 parent c4b5013 commit ec7e54c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/bump-edge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { promises as fsp } from 'node:fs'
import { execSync } from 'node:child_process'
import { $fetch } from 'ohmyfetch'
import { resolve } from 'pathe'
import { globby } from 'globby'

Expand Down Expand Up @@ -100,6 +101,11 @@ async function main () {
const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim()
const date = Math.round(Date.now() / (1000 * 60))

const nuxtPkg = workspace.find('nuxt')
const nitroInfo = await $fetch('https://registry.npmjs.org/nitropack-edge')
const latestNitro = nitroInfo['dist-tags'].latest
nuxtPkg.data.dependencies.nitropack = `npm:nitropack-edge@^${latestNitro}`

for (const pkg of workspace.packages.filter(p => !p.data.private)) {
workspace.setVersion(pkg.data.name, `${pkg.data.version}-${date}.${commit}`)
const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge')
Expand Down

0 comments on commit ec7e54c

Please sign in to comment.