Skip to content

Commit 30c8032

Browse files
committed
refactor: replace conventional-changelog with changesets and add kit release action
1 parent 528eba7 commit 30c8032

File tree

18 files changed

+746
-651
lines changed

18 files changed

+746
-651
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"linked": [],
6+
"access": "restricted",
7+
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
9+
"ignore": ["playground/*"]
10+
}
11+

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
21+
with:
22+
node-version: 12.x
23+
24+
- run: npm install -g pnpm
25+
- run: pnpm install --frozen-lockfile
26+
27+
- name: Create Release Pull Request or Publish to npm
28+
id: changesets
29+
uses: changesets/action@master
30+
with:
31+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
32+
publish: pnpm release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
37+
# TODO alert discord
38+
# - name: Send a Slack notification if a publish happens
39+
# if: steps.changesets.outputs.published == 'true'
40+
# # You can do something when a publish happens.
41+
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This is the official [svelte](https://svelte.dev) plugin for [vite](https://vite
44

55
## Packages
66

7-
| Package | changelog |
8-
| ----------------------------------------------------------- | ----------------------------------------------------- |
9-
| [@sveltejs/vite-plugin-svelte](packages/vite-plugin-svelte) | [changelog](packages/vite-plugin-svelte/CHANGELOG.md) |
7+
| Package | changelog |
8+
| ----------------------------------------------------------- | -------------------------------------------------------- |
9+
| [@sveltejs/vite-plugin-svelte](packages/vite-plugin-svelte) | [changelog](packages/vite-plugin-svelte/CHANGELOG_0x.md) |
1010

1111
# Got a question? / Need help?
1212

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
"format": "prettier --ignore-path .gitignore '**/*.{css,scss,svelte,html,js,ts,svx,md}' --check",
2323
"format:fix": "pnpm format -- --write",
2424
"fixup": "run-s lint:fix format:fix",
25-
"update-deps": "ncu -u"
25+
"update-deps": "ncu -u",
26+
"release": "pnpm publish --tag=next --filter=\"@sveltejs/*\" --filter=\"create-svelte\""
2627
},
2728
"devDependencies": {
29+
"@changesets/cli": "^2.14.1",
2830
"@commitlint/cli": "^12.0.1",
2931
"@commitlint/config-conventional": "^12.0.1",
3032
"@microsoft/api-extractor": "^7.13.2",
@@ -35,7 +37,6 @@
3537
"@typescript-eslint/eslint-plugin": "^4.18.0",
3638
"@typescript-eslint/parser": "^4.18.0",
3739
"chalk": "^4.1.0",
38-
"conventional-changelog-cli": "^2.1.1",
3940
"cross-env": "^7.0.3",
4041
"enquirer": "^2.3.6",
4142
"esbuild": "^0.9.2",

packages/playground/big/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "playground-big",
3+
"private": true,
34
"version": "0.0.0",
45
"scripts": {
56
"dev": "vite",

packages/playground/default-svelte-template-ts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "playground-default-svelte-template-ts",
3+
"private": true,
34
"version": "1.0.0",
45
"scripts": {
56
"build": "vite build",

packages/playground/default-svelte-template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "playground-default-svelte-template",
3+
"private": true,
34
"version": "1.0.0",
45
"scripts": {
56
"build": "vite build",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"version": "1.0.0",
3-
"name": "@sveltejs/hmr-test-dependency",
3+
"private": true,
4+
"name": "playground-hmr-test-dependency",
45
"main": "index.js"
56
}

packages/playground/hmr/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "playground-hmr",
3+
"private": true,
34
"version": "0.0.0",
45
"scripts": {
56
"dev": "vite",
67
"build": "vite build"
78
},
89
"dependencies": {
9-
"@sveltejs/hmr-test-dependency": "workspace:*"
10+
"playground-hmr-test-dependency": "workspace:*"
1011
},
1112
"devDependencies": {
1213
"@sveltejs/vite-plugin-svelte": "workspace:*",

0 commit comments

Comments
 (0)