diff --git a/CHANGELOG.md b/CHANGELOG.md index cd87c3a2..4702da1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [1.0.0-alpha.1](https://github.com/vuejs/vitepress/compare/v0.22.4...v1.0.0-alpha.1) (2022-06-01) + +Complete rewrite on default theme, with bunch of features added. Please refer to the docs for the new feature and changes. + ## [0.22.4](https://github.com/vuejs/vitepress/compare/v0.22.3...v0.22.4) (2022-05-06) ### Bug Fixes diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index d3b840d7..3cf6255e 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -16,9 +16,7 @@ export default defineConfig({ }, editLink: { - domain: 'gitlab.com', repo: 'vuejs/vitepress', - branch: 'main', dir: 'docs', text: 'Edit this page on GitHub' }, diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 852a36bf..e5d15f18 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -15,12 +15,12 @@ The essential file for configuring a VitePress site is `.vitepress/config.js`, w ```js export default { - title: 'Hello VitePress', + title: 'VitePress', description: 'Just playing around.' } ``` -In the above example, the site will have the title of `VitePress`, and `Just playing around` as description meta tag. +In the above example, the site will have the title of `VitePress`, and `Just playing around.` as the description meta tag. Learn everything about VitePress features at [Theme: Introduction](./theme-introduction) to find how to configure specific features with in this config file. diff --git a/package.json b/package.json index d1cd5fe0..6f918243 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vitepress", - "version": "1.0.0-draft.8", + "version": "1.0.0-alpha.1", "description": "Vite & Vue powered static site generator", "type": "module", "packageManager": "pnpm@7.1.7", diff --git a/scripts/release.js b/scripts/release.js index 94f900ba..8da3732a 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -1,15 +1,20 @@ import { readFileSync, writeFileSync } from 'fs' import { resolve } from 'path' +import { fileURLToPath } from 'url' import c from 'picocolors' -import { inc as _inc, valid } from 'semver' import prompts from 'prompts' import { execa } from 'execa' -import { version as currentVersion } from '../package.json' -import { fileURLToPath } from 'url' +import semver from 'semver' +import pkg from '../package.json' assert { type: 'json' } + +const { version: currentVersion } = pkg +const { inc: _inc, valid } = semver const versionIncrements = ['patch', 'minor', 'major'] -const dir = dirname(fileURLToPath(import.meta.url)) +const tags = ['latest', 'next'] + +const dir = fileURLToPath(new URL('.', import.meta.url)) const inc = (i) => _inc(currentVersion, i) const run = (bin, args, opts = {}) => execa(bin, args, { stdio: 'inherit', ...opts }) @@ -18,34 +23,45 @@ const step = (msg) => console.log(c.cyan(msg)) async function main() { let targetVersion + const versions = versionIncrements + .map((i) => `${i} (${inc(i)})`) + .concat(['custom']) + const { release } = await prompts({ type: 'select', name: 'release', message: 'Select release type', - choices: versionIncrements.map((i) => `${i} (${inc(i)})`).concat(['custom']) + choices: versions }) - - if (release === 'custom') { + console.log(release, release === 3) + if (release === 3) { targetVersion = ( await prompts({ - type: 'input', + type: 'text', name: 'version', message: 'Input custom version', initial: currentVersion }) ).version } else { - targetVersion = release.match(/\((.*)\)/)[1] + targetVersion = versions[release].match(/\((.*)\)/)[1] } if (!valid(targetVersion)) { throw new Error(`Invalid target version: ${targetVersion}`) } + const { tag } = await prompts({ + type: 'select', + name: 'tag', + message: 'Select tag type', + choices: tags + }) + const { yes: tagOk } = await prompts({ type: 'confirm', name: 'yes', - message: `Releasing v${targetVersion}. Confirm?` + message: `Releasing v${targetVersion} on ${tags[tag]}. Confirm?` }) if (!tagOk) { @@ -83,7 +99,13 @@ async function main() { // Publish the package. step('\nPublishing the package...') - await run('pnpm', ['publish', '--ignore-scripts', '--no-git-checks']) + await run('pnpm', [ + 'publish', + '--tag', + tags[tag], + '--ignore-scripts', + '--no-git-checks' + ]) // Push to GitHub. step('\nPushing to GitHub...')