Skip to content

Commit

Permalink
chore: switch to release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Feb 13, 2023
1 parent 13d175a commit 4a02b5a
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 82 deletions.
10 changes: 0 additions & 10 deletions .autorc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/first-interaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: 'Welcome to Vega. Since this is your first contribution, please make sure to read the [contributing guide](https://github.com/vega/vega-lite/blob/next/CONTRIBUTING.md).'
pr-message: 'Welcome to Vega. Since this is your first contribution, please make sure to read the [contributing guide](https://github.com/vega/vega-lite/blob/main/CONTRIBUTING.md).'
45 changes: 0 additions & 45 deletions .github/workflows/publish-to-npm.yml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ examples/specs/*.vl.json
site/_includes/*
site/examples/*
site/_site/*
CHANGELOG.md
16 changes: 16 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"hooks": {
"after:bump": "yarn build"
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md"
}
}
}
12 changes: 3 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can find [tasks with the "Good first issue" label in the issue tracker :pray

The website is under `site/` and the documentation is under `site/docs/`. We use GitHub Pages to publish our documentation when we release a new version. To contribute changes to the documentation or website, simply submit a pull request that changes the corresponding markdown files in `site/`.

Since we only publish the GitHub Pages when we release a new version, it might be slightly outdated compared to `next`. For development, once you have [setup the repository](#repository-setup), you can run `yarn site` to serve the GitHub page locally at [http://localhost:4000/vega-lite/](http://localhost:4000/vega-lite/).
Since we only publish the GitHub Pages when we release a new version, it might be slightly outdated compared to `main`. For development, once you have [setup the repository](#repository-setup), you can run `yarn site` to serve the GitHub page locally at [http://localhost:4000/vega-lite/](http://localhost:4000/vega-lite/).

Note that when you checkout different branches, the compiled JavaScript for the website might be reset. You might have to run `yarn build:site` to recompile the JavaScript so that interactive examples work.

Expand Down Expand Up @@ -194,15 +194,9 @@ During development, it can be convenient to rebuild automatically or to run test

`yarn site`. See details in [Documentation and Website](#documentation-and-website).

### Deployment
### Publishing

Publishing is handled by a 2-branch [pre-release process](https://intuit.github.io/auto/docs/generated/shipit#next-branch-default), configured in `publish-to-npm.yml`. All changes should be based off the default `next` branch, and are published automatically.

- PRs made into the default branch are auto-deployed to the `next` pre-release tag on NPM. The result can be installed with `npm install vega-lite/@next`.
- When merging into `next`, please use the `squash and merge` strategy.
- To release a new stable version, open a PR from `next` into `stable` using this [compare link](https://github.com/vega/vega-lite/compare/stable...next).
- When merging from `next` into `stable`, please use the `create a merge commit` strategy.
- After the release note is generated (from commits), please take a look to clean up so the log is readable to the community.
To make a release, run `npm run release`. After the release notes are generated (from commits), please take a look to clean up so they are readable to the community. Triggered by the GitHub release, the CI will automatically deploy the website and update the schema repo.

## Suggested Programming Environment.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vega-Lite <a href="https://vega.github.io/vega-lite/"><img align="right" src="https://github.com/vega/logos/blob/master/assets/VL_Color@64.png?raw=true" height="38"></img></a>

[![npm version](https://img.shields.io/npm/v/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) [![Build Status](https://github.com/vega/vega-lite/workflows/Test/badge.svg)](https://github.com/vega/vega-lite/actions) [![codecov](https://codecov.io/gh/vega/vega-lite/branch/next/graph/badge.svg)](https://codecov.io/gh/vega/vega-lite) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=rounded)](https://github.com/prettier/prettier) [![JSDevlivr](https://data.jsdelivr.com/v1/package/npm/vega-lite/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vega-lite)
[![npm version](https://img.shields.io/npm/v/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) [![Build Status](https://github.com/vega/vega-lite/workflows/Test/badge.svg)](https://github.com/vega/vega-lite/actions) [![codecov](https://codecov.io/gh/vega/vega-lite/branch/main/graph/badge.svg)](https://codecov.io/gh/vega/vega-lite) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=rounded)](https://github.com/prettier/prettier) [![JSDevlivr](https://data.jsdelivr.com/v1/package/npm/vega-lite/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vega-lite)

![Teaser](site/static/teaser.png)

Expand Down
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
"watch:site": "yarn build:site -w",
"watch:test": "yarn jest --watch test/",
"watch:test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",
"release": "yarn run prebuild && yarn build && yarn shipit",
"shipit": "auto shipit"
"release": "yarn release-it"
},
"repository": {
"type": "git",
Expand All @@ -83,47 +82,46 @@
"url": "https://github.com/vega/vega-lite/issues"
},
"devDependencies": {
"@auto-it/conventional-commits": "^10.37.6",
"@auto-it/first-time-contributor": "^10.37.6",
"@babel/core": "^7.19.1",
"@babel/preset-env": "^7.19.1",
"@babel/preset-typescript": "^7.18.6",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-alias": "^4.0.0",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@types/chai": "^4.3.3",
"@types/d3": "^7.4.0",
"@types/jest": "^27.4.1",
"@types/mkdirp": "^1.0.2",
"@types/pako": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"ajv": "^8.11.0",
"ajv-formats": "^2.1.1",
"auto": "^10.37.6",
"ajv": "^8.11.0",
"chai": "^4.3.6",
"cheerio": "^1.0.0-rc.12",
"conventional-changelog-cli": "^2.2.2",
"d3": "^7.6.1",
"del-cli": "^5.0.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.23.1",
"gh-pages": "^5.0.0",
"highlight.js": "^11.6.0",
"jest": "^27.5.1",
"jest-dev-server": "^6.1.1",
"jest": "^27.5.1",
"mkdirp": "^2.1.3",
"pako": "^2.0.4",
"prettier": "^2.7.1",
"puppeteer": "^15.0.0",
"rollup": "^2.79.1",
"release-it": "^15.6.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-terser": "^7.0.2",
"rollup": "^2.79.1",
"serve": "^14.0.1",
"terser": "^5.15.0",
"ts-jest": "^29.0.1",
Expand Down
5 changes: 3 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import alias from '@rollup/plugin-alias';
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import alias from '@rollup/plugin-alias';
import terser from '@rollup/plugin-terser';
import bundleSize from 'rollup-plugin-bundle-size';
import {terser} from 'rollup-plugin-terser';

import pkg from './package.json';

export function disallowedImports() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-and-commit-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"

# Only push on human pull request branches. Exclude release, prerelease, and bot branches.
if [ "$GIT_BRANCH" != "stable" ] && [ "$GIT_BRANCH" != "next" ] && [[ "$GIT_BRANCH" != dependabot/* ]]; then
if [ "$GIT_BRANCH" != "stable" ] && [ "$GIT_BRANCH" != "main" ] && [[ "$GIT_BRANCH" != dependabot/* ]]; then
PUSH_BRANCH=true
echo "Will try to push changes."
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-and-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"

# Only push on human pull request branches. Exclude release, prerelease, and bot branches.
if [ "$GIT_BRANCH" != "stable" ] && [ "$GIT_BRANCH" != "next" ] && [[ "$GIT_BRANCH" != dependabot/* ]]; then
if [ "$GIT_BRANCH" != "stable" ] && [ "$GIT_BRANCH" != "main" ] && [[ "$GIT_BRANCH" != dependabot/* ]]; then
PUSH_BRANCH=true
echo "Will try to push changes."
else
Expand Down
2 changes: 1 addition & 1 deletion site/ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permalink: /ecosystem.html
redirect_from: /applications.html
---

This is an incomplete list of integrations, applications, and extensions of the Vega-Lite language and compiler. If you want to add a tool or library, [edit this file and send us a pull request](https://github.com/vega/vega-lite/blob/next/site/ecosystem.md).
This is an incomplete list of integrations, applications, and extensions of the Vega-Lite language and compiler. If you want to add a tool or library, [edit this file and send us a pull request](https://github.com/vega/vega-lite/blob/main/site/ecosystem.md).

We mark featured plugins and tools with a <span class="octicon octicon-star"></span>.

Expand Down
2 changes: 1 addition & 1 deletion site/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import bundleSize from 'rollup-plugin-bundle-size';
import {terser} from 'rollup-plugin-terser';

const watch = process.env.ROLLUP_WATCH;

Expand Down

0 comments on commit 4a02b5a

Please sign in to comment.