Skip to content

Commit

Permalink
feat!: move edge releases to nightly releases
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 9, 2025
1 parent f2a2fb7 commit 5c6df03
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
- run: pnpm lint
- run: pnpm build
- run: pnpm typecheck
- name: Release Edge
- name: Release Nightly
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip-release]')
run: ./scripts/release-edge.sh
run: ./scripts/release-nightly.sh
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN_NIGHTLY}}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ export default defineNuxtConfig({
})
```

### Edge Release Channel
### Nightly Release Channel

Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel#opting-into-the-edge-channel), DevTools also offers an edge release channel, that automatically releases for every commit to `main` branch.
Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.

You can opt-in to the edge release channel by running:
You can opt-in to the nightly release channel by running:

```diff
{
"devDependencies": {
-- "@nuxt/devtools": "^0.1.0"
++ "@nuxt/devtools": "npm:@nuxt/devtools-edge@latest"
++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/content/1.guide/0.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ export default defineNuxtConfig({
})
```

### Edge Release Channel
### Nightly Release Channel

Similar to [Nuxt's Edge Channel](https://nuxt.com/docs/guide/going-further/edge-channel#opting-into-the-edge-channel), DevTools also offers an edge release channel, that automatically releases for every commit to `main` branch.
Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.

You can opt-in to the edge release channel by running:
You can opt-in to the nightly release channel by running:

```diff
{
"devDependencies": {
-- "@nuxt/devtools": "^0.1.0"
++ "@nuxt/devtools": "npm:@nuxt/devtools-edge@latest"
++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxt-devtools/monorepo",
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"packageManager": "pnpm@9.15.3",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxt/devtools-kit",
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"license": "MIT",
"homepage": "https://devtools.nuxt.com/module/utils-kit",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @nuxt/devtools-ui-kit

<a href="https://www.npmjs.com/package/@nuxt/devtools-ui-kit-edge"><img src="https://flat.badgen.net/npm/v/@nuxt/devtools-ui-kit-edge"></a>
<a href="https://www.npmjs.com/package/@nuxt/devtools-ui-kit"><img src="https://flat.badgen.net/npm/v/@nuxt/devtools-ui-kit"></a>

> **Warning**: This library is heavily working in progress. Breaking changes may not follow semver. Pin the version if used.
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxt/devtools-ui-kit",
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"license": "MIT",
"homepage": "https://devtools.nuxt.com/module/ui-kit",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-wizard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxt/devtools-wizard",
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"description": "CLI Wizard to toggle Nuxt DevTools",
"license": "MIT",
"homepage": "https://devtools.nuxt.com",
Expand Down
6 changes: 3 additions & 3 deletions packages/devtools-wizard/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ async function run() {
consola.log(`${colors.inverse(colors.bold(colors.green(' DevTools ')))} ${colors.green(`v${version}`)}`)
consola.log(`\n${colors.gray('Learn more at https://devtools.nuxt.com\n')}`)

if (moduleName.endsWith('-edge'))
throw new Error('Edge release of Nuxt DevTools requires to be installed locally. Learn more at https://github.com/nuxt/devtools/#edge-release-channel')
if (moduleName.endsWith('-edge') || moduleName.endsWith('-nightly'))
throw new Error('Nightly release of Nuxt DevTools requires to be installed locally. Learn more at https://github.com/nuxt/devtools/#nightly-release-channel')

const nuxtVersion = await getNuxtVersion(cwd)
if (!nuxtVersion) {
consola.error('Unable to find any installed nuxt version icurrent directory')
consola.error('Unable to find any installed nuxt version in the current directory')
process.exit(1)
}
// Nuxt 3.4.0 will have devtools built-in
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/AssetDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function saveTextContent() {
const config = useServerConfig()
const hasNuxtImage = computed(() => {
const modules = config.value?._installedModules || []
return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge')
return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge' || m.meta?.name === '@nuxt/image-nightly')
})
const codeSnippets = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxt/devtools",
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
"license": "MIT",
"homepage": "https://devtools.nuxt.com",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/src/module-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function enableModule(options: ModuleOptions, nuxt: Nuxt) {
// Determine if user aware devtools, by checking the presentation in the config
const enabledExplicitly = (nuxt.options.devtools === true as unknown)
|| (nuxt.options.devtools && nuxt.options.devtools.enabled)
|| !!nuxt.options.modules.find(m => m === '@nuxt/devtools' || m === '@nuxt/devtools-edge')
|| !!nuxt.options.modules.find(m => m === '@nuxt/devtools' || m === '@nuxt/devtools-edge' || m === '@nuxt/devtools-nightly')

await nuxt.callHook('devtools:before')

Expand Down
2 changes: 1 addition & 1 deletion playgrounds/empty/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "empty",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"main": "nuxt.config.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/module-starter/client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-module-client",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true
}
2 changes: 1 addition & 1 deletion playgrounds/module-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "module",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/module-starter/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-module-playground",
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true
}
2 changes: 1 addition & 1 deletion playgrounds/tab-layers/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"build": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/tab-pinia/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"dev": "nuxi dev",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/tab-seo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"build": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/tab-server-route/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"build": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/tab-timeline/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"build": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/v4/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "2.0.0-beta.0",
"private": true,
"scripts": {
"build": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion scripts/bump-edge.ts → scripts/bump-nightly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function main() {

for (const pkg of workspace.packages.filter(p => !p.data.private)) {
workspace.setVersion(pkg.data.name, `${pkg.data.version}-${date}.${commit}`)
workspace.rename(pkg.data.name, `${pkg.data.name}-edge`)
workspace.rename(pkg.data.name, `${pkg.data.name}-nightly`)
}

await workspace.save()
Expand Down
4 changes: 2 additions & 2 deletions scripts/release-edge.sh → scripts/release-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -xe
# Restore all git changes
git restore -s@ -SW -- packages

# Bump versions to edge
pnpm jiti ./scripts/bump-edge
# Bump versions to nightly
pnpm jiti ./scripts/bump-nightly

# Update token
if [[ ! -z ${NODE_AUTH_TOKEN} ]] ; then
Expand Down

0 comments on commit 5c6df03

Please sign in to comment.